sorted_map: add is_empty

This commit is contained in:
ljedrz 2018-11-18 10:44:25 +01:00
parent 61de47dd25
commit eb772045f8

View File

@ -143,6 +143,11 @@ impl<K: Ord, V> SortedMap<K, V> {
self.data.len()
}
#[inline]
pub fn is_empty(&self) -> bool {
self.len() == 0
}
#[inline]
pub fn range<R>(&self, range: R) -> &[(K, V)]
where R: RangeBounds<K>