Remove unsafety from Trap API (#779)
* Remove unsafety from `Trap` API This commit removes the `unsafe impl Send` for `Trap` by removing the internal `HostRef` and leaving `HostRef` entirely as an implementation detail of the C API. cc #708 * Run rustfmt
This commit is contained in:
@@ -45,7 +45,7 @@ pub fn instantiate_in_context(
|
||||
)
|
||||
.map_err(|e| -> Error {
|
||||
if let Some(trap) = take_api_trap() {
|
||||
Trap::from(trap).into()
|
||||
trap.into()
|
||||
} else if let SetupError::Instantiate(InstantiationError::StartTrap(msg)) = e {
|
||||
Trap::new(msg).into()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user