mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-15 08:15:07 +00:00
stop escaping roc panic strings in the llvm helpers
This commit is contained in:
parent
9f80aa4df7
commit
291b77c83b
2 changed files with 3 additions and 28 deletions
|
@ -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()
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue