Skip to content

Commit

Permalink
Fix clone test
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienG2 committed Jan 1, 2025
1 parent 316f00a commit 1ef9ba3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1ef9ba3

Please sign in to comment.