Skip to content

Commit eb77204

Browse files
committed
sorted_map: add is_empty
1 parent 61de47d commit eb77204

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/librustc_data_structures/sorted_map.rs

+5
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ impl<K: Ord, V> SortedMap<K, V> {
143143
self.data.len()
144144
}
145145

146+
#[inline]
147+
pub fn is_empty(&self) -> bool {
148+
self.len() == 0
149+
}
150+
146151
#[inline]
147152
pub fn range<R>(&self, range: R) -> &[(K, V)]
148153
where R: RangeBounds<K>

0 commit comments

Comments
 (0)