From 1ef9ba35669244a0b6488c543b0640d344d6abe1 Mon Sep 17 00:00:00 2001 From: Hadrien Grasland Date: Wed, 1 Jan 2025 14:39:42 +0100 Subject: [PATCH] Fix clone test --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b81ca15..fc9e272 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -625,10 +625,11 @@ mod tests { // Check that the clone uses its own, separate shared data storage assert_eq!( - as_ptr(&buf_clone.output.shared), + as_ptr(&buf_clone.input.shared), as_ptr(&buf_clone.output.shared) ); - assert!(as_ptr(&buf_clone.input.shared) != as_ptr(&buf.input.shared)); + assert_ne!(as_ptr(&buf_clone.input.shared), as_ptr(&buf.input.shared)); + assert_ne!(as_ptr(&buf_clone.output.shared), as_ptr(&buf.output.shared)); // Check that it is identical from PartialEq's point of view assert_eq!(buf, buf_clone);