From e21c66811f8ed8bf8732abb9479a57f4c0ce24ea Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Thu, 21 May 2020 00:36:25 +0200 Subject: [PATCH] fix rust warnings --- napi/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/napi/src/lib.rs b/napi/src/lib.rs index 2956d49..513041e 100644 --- a/napi/src/lib.rs +++ b/napi/src/lib.rs @@ -765,7 +765,7 @@ where call: fn(&F, &JsEnv, Arc>, Vec) -> Result, } -unsafe extern "C" fn call_method<'a, O, T, F>(env: napi_env, info: napi_callback_info) -> RawValue +unsafe extern "C" fn call_method(env: napi_env, info: napi_callback_info) -> RawValue where T: ToNapi, { @@ -776,8 +776,7 @@ where let ctx = Box::from_raw(ctx); let ret = (ctx.call)(&ctx.f, &env, info.this, info.args)?; Box::leak(ctx); - let ret = ret.to_napi(&env); - ret + ret.to_napi(&env) }) }