stop escaping roc panic strings in the llvm helpers

This commit is contained in:
Folkert 2022-07-14 20:08:03 +02:00
parent 9f80aa4df7
commit 291b77c83b
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 3 additions and 28 deletions

View file

@ -39,12 +39,7 @@ impl<T: Sized> From<RocCallResult<T>> for Result<T, String> {
_ => Err({
let raw = unsafe { CString::from_raw(call_result.error_msg) };
let result = format!("{:?}", raw);
// make sure rust does not try to free the Roc string
std::mem::forget(raw);
result
raw.into_string().unwrap()
}),
}
}