Fix clippy warnings

This commit is contained in:
Lucien Greathouse
2019-10-17 18:22:53 -07:00
parent ec614e1912
commit 44c94da2d8
17 changed files with 42 additions and 33 deletions

View File

@@ -31,7 +31,7 @@ impl<K: Hash + Eq, V: Eq> MultiMap<K, V> {
let bucket = self.inner.entry(k).or_default();
for value in &*bucket {
if &*value == &v {
if *value == v {
return;
}
}
@@ -49,7 +49,7 @@ impl<K: Hash + Eq, V: Eq> MultiMap<K, V> {
removed_value = Some(bucket.swap_remove(index));
}
if bucket.len() == 0 {
if bucket.is_empty() {
self.inner.remove(k.borrow());
}