From c93f1a3733fe9b90f1806d1e7bfb981fbc7d9c32 Mon Sep 17 00:00:00 2001 From: rambip Date: Thu, 28 Sep 2023 23:36:03 +0200 Subject: [PATCH] clippy hint: copy instead of clone for callbacks --- leptos_reactive/src/callback.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leptos_reactive/src/callback.rs b/leptos_reactive/src/callback.rs index 8271d36db4..27f14402c4 100644 --- a/leptos_reactive/src/callback.rs +++ b/leptos_reactive/src/callback.rs @@ -87,7 +87,7 @@ impl fmt::Debug for Callback { impl Clone for Callback { fn clone(&self) -> Self { - Self(self.0.clone()) + Self(self.0) } } @@ -176,7 +176,7 @@ impl Callable for SyncCallback { impl Clone for SyncCallback { fn clone(&self) -> Self { - Self(self.0.clone()) + Self(self.0) } }