Skip to content

Commit

Permalink
sorted_map: add is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ljedrz committed Dec 10, 2018
1 parent 61de47d commit eb77204
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librustc_data_structures/sorted_map.rs
Expand Up @@ -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>
Expand Down

0 comments on commit eb77204

Please sign in to comment.