From ebc8ec1dc13314ff57d18dcbb2104679f056fa2a Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Wed, 3 Apr 2024 14:30:30 +1100 Subject: [PATCH] Fix linting issues --- native/wasmex/src/instance.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/native/wasmex/src/instance.rs b/native/wasmex/src/instance.rs index 992c3d29..97e84462 100644 --- a/native/wasmex/src/instance.rs +++ b/native/wasmex/src/instance.rs @@ -121,7 +121,6 @@ pub fn get_global_value( #[rustler::nif(name = "instance_set_global_value", schedule = "DirtyCpu")] pub fn set_global_value( - env: rustler::Env, store_or_caller_resource: ResourceArc, instance_resource: ResourceArc, global_name: String, @@ -149,9 +148,8 @@ pub fn set_global_value( let global_type = global.ty(&store_or_caller).content().clone(); - let new_value = decode_term_as_wasm_value(global_type, new_value).ok_or_else(|| { - rustler::Error::Term(Box::new(format!("Cannot convert to a WebAssembly value."))) - })?; + let new_value = decode_term_as_wasm_value(global_type, new_value) + .ok_or_else(|| rustler::Error::Term(Box::new("Cannot convert to a WebAssembly value.")))?; let val: Val = match new_value { WasmValue::I32(value) => value.into(),