From f872040d70b39a64d82adacf6cb8198c2ddea7f7 Mon Sep 17 00:00:00 2001 From: "Kai A. Hiller" Date: Tue, 15 Mar 2022 23:27:59 +0100 Subject: [PATCH] Tidy up code a little bit --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0881e39..5dda622 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -667,7 +667,7 @@ where for (key, vector) in &mut self.inner { vector.retain(|value| f(key, value)); } - self.inner.retain(|&_, ref v| !v.is_empty()); + self.inner.retain(|_, v| !v.is_empty()); } } @@ -1260,11 +1260,11 @@ mod tests { let mut m2 = MultiMap::new(); m2.insert(1, 2); m2.insert(2, 3); - assert!(m1 != m2); + assert_ne!(m1, m2); m2.insert(3, 4); assert_eq!(m1, m2); m2.insert(3, 4); - assert!(m1 != m2); + assert_ne!(m1, m2); m1.insert(3, 4); assert_eq!(m1, m2); }