From b1c33f0350ded305758890034e02d8ccf867b77b Mon Sep 17 00:00:00 2001 From: Guy Nir Date: Sun, 15 Dec 2024 11:20:49 +0200 Subject: [PATCH] fix(sequencing): replace vectors with arrays as test function inputs --- .../sequencing/papyrus_consensus/src/stream_handler_test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/sequencing/papyrus_consensus/src/stream_handler_test.rs b/crates/sequencing/papyrus_consensus/src/stream_handler_test.rs index c2995108b8..047bf27142 100644 --- a/crates/sequencing/papyrus_consensus/src/stream_handler_test.rs +++ b/crates/sequencing/papyrus_consensus/src/stream_handler_test.rs @@ -35,13 +35,13 @@ mod tests { } // Check if two vectors are the same, regardless of ordering - fn do_vecs_match_unordered(a: &Vec, b: &Vec) -> bool + fn do_vecs_match_unordered(a: &[T], b: &[T]) -> bool where T: std::hash::Hash + Eq, { - let mut a = a.clone(); + let mut a = a.to_owned(); a.sort(); - let mut b = b.clone(); + let mut b = b.to_owned(); b.sort(); a == b }