fix clippy warnings on table

This commit is contained in:
Trinity Pointard
2021-04-23 21:42:52 +02:00
committed by Alex Auvolat
parent f05bb111c2
commit f5a0cf0414
10 changed files with 63 additions and 43 deletions
+15
View File
@@ -62,6 +62,11 @@ where
pub fn len(&self) -> usize {
self.vals.len()
}
/// Returns true if the map is empty
pub fn is_empty(&self) -> bool {
self.len() == 0
}
}
impl<K, V> CRDT for Map<K, V>
@@ -82,3 +87,13 @@ where
}
}
}
impl<K, V> Default for Map<K, V>
where
K: Clone + Ord,
V: Clone + CRDT,
{
fn default() -> Self {
Self::new()
}
}