From 39af36adbf44cc9174f197ad50e67a928d171260 Mon Sep 17 00:00:00 2001 From: "K.J. Valencik" Date: Fri, 17 Nov 2023 09:50:40 -0500 Subject: [PATCH] Clippy fixes --- crates/neon/src/handle/mod.rs | 5 +---- crates/neon/src/types_impl/boxed.rs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/neon/src/handle/mod.rs b/crates/neon/src/handle/mod.rs index 06fb134cf..2994e9998 100644 --- a/crates/neon/src/handle/mod.rs +++ b/crates/neon/src/handle/mod.rs @@ -80,10 +80,7 @@ pub struct Handle<'a, V: Value + 'a> { impl<'a, V: Value> Clone for Handle<'a, V> { fn clone(&self) -> Self { - Self { - value: self.value, - phantom: PhantomData, - } + *self } } diff --git a/crates/neon/src/types_impl/boxed.rs b/crates/neon/src/types_impl/boxed.rs index 4306bbed5..990ce83cf 100644 --- a/crates/neon/src/types_impl/boxed.rs +++ b/crates/neon/src/types_impl/boxed.rs @@ -164,10 +164,7 @@ unsafe fn maybe_external_deref<'a>(env: Env, local: raw::Local) -> Option<&'a Bo // Custom `Clone` implementation since `T` might not be `Clone` impl Clone for JsBoxInner { fn clone(&self) -> Self { - Self { - local: self.local, - raw_data: self.raw_data, - } + *self } }