Skip to content
Snippets Groups Projects
Commit eba03961 authored by Zhenghao Lu's avatar Zhenghao Lu Committed by GitHub
Browse files

Simplified code using existing APIs (#11702)


Signed-off-by: default avatarEmison Lu <lzh1633856298@gmail.com>
parent 440a6db9
No related merge requests found
......@@ -145,11 +145,7 @@ impl<'a> sp_wasm_interface::FunctionContext for HostContext<'a> {
}
fn register_panic_error_message(&mut self, message: &str) {
self.caller
.data_mut()
.host_state_mut()
.expect("host state is not empty when calling a function in wasm; qed")
.panic_message = Some(message.to_owned());
self.host_state_mut().panic_message = Some(message.to_owned());
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment