From f1991c36992a0579e3b46988623385f1cbfc4d88 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 24 Aug 2024 17:29:50 +0100 Subject: [PATCH] fix(serde_yml): :white_check_mark: Removed unnecessary `clone` calls for types implementing the `Copy` trait to resolve Clippy warnings. --- tests/modules/test_path.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/modules/test_path.rs b/tests/modules/test_path.rs index 408673b3..78b64fe3 100644 --- a/tests/modules/test_path.rs +++ b/tests/modules/test_path.rs @@ -105,7 +105,7 @@ mod tests { /// Test cloning and copying a Path instance. /// - /// This test checks that cloning and copying a Path instance results in identical paths. + /// This test checks that copying a Path instance results in an identical path. #[test] fn test_path_clone_and_copy() { let root = Path::Root; @@ -113,10 +113,10 @@ mod tests { parent: &root, index: 42, }; - let seq_clone = seq.clone(); + + // No need to explicitly clone, just copy directly let seq_copy = seq; - assert_eq!(seq, seq_clone); assert_eq!(seq, seq_copy); }