From 3e9276509ce71ebc21316fbdf0228da27e54c67f Mon Sep 17 00:00:00 2001 From: LongYinan Date: Sat, 28 Jan 2023 20:47:20 +0800 Subject: [PATCH] chore: allow uninlined_format_args in tests --- bench/src/lib.rs | 2 ++ crates/napi/src/env.rs | 4 ++-- examples/napi-compat-mode/src/lib.rs | 1 + examples/napi/src/lib.rs | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bench/src/lib.rs b/bench/src/lib.rs index a6d5a6f680..01d38976a6 100644 --- a/bench/src/lib.rs +++ b/bench/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(clippy::uninlined_format_args)] + #[macro_use] extern crate napi_derive; diff --git a/crates/napi/src/env.rs b/crates/napi/src/env.rs index ce7365a2ad..f11b75bfff 100644 --- a/crates/napi/src/env.rs +++ b/crates/napi/src/env.rs @@ -357,7 +357,7 @@ impl Env { &mut raw_value, ); data = result_data.cast(); - finalize(hint, self.clone()); + finalize(hint, *self); check_status!(status)?; } else { check_status!(status)?; @@ -520,7 +520,7 @@ impl Env { let status = sys::napi_create_arraybuffer(self.0, length, &mut underlying_data, &mut raw_value); data = underlying_data.cast(); - finalize(hint, self.clone()); + finalize(hint, *self); check_status!(status)?; } else { check_status!(status)?; diff --git a/examples/napi-compat-mode/src/lib.rs b/examples/napi-compat-mode/src/lib.rs index c734807de9..74c891923b 100644 --- a/examples/napi-compat-mode/src/lib.rs +++ b/examples/napi-compat-mode/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_variables)] +#![allow(clippy::uninlined_format_args)] #[macro_use] extern crate napi_derive; diff --git a/examples/napi/src/lib.rs b/examples/napi/src/lib.rs index c696d02c69..fdd3e4fe58 100644 --- a/examples/napi/src/lib.rs +++ b/examples/napi/src/lib.rs @@ -1,6 +1,7 @@ #![allow(dead_code)] #![allow(unreachable_code)] #![allow(clippy::disallowed_names)] +#![allow(clippy::uninlined_format_args)] #[macro_use] extern crate napi_derive;