From f773697bc1f4a23023f8c2f50b03d25f9f733cec Mon Sep 17 00:00:00 2001 From: ridiculousfish <rf@fishshell.com> Date: Sat, 25 Nov 2023 19:08:22 -0800 Subject: [PATCH] Fix a clippy lint in ConstPointer --- fish-rust/src/pointer.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fish-rust/src/pointer.rs b/fish-rust/src/pointer.rs index e9ada1634..8d0783235 100644 --- a/fish-rust/src/pointer.rs +++ b/fish-rust/src/pointer.rs @@ -17,10 +17,9 @@ impl<T> Default for ConstPointer<T> { } } -#[allow(clippy::incorrect_clone_impl_on_copy_type)] impl<T> Clone for ConstPointer<T> { fn clone(&self) -> Self { - Self(self.0) + *self } }