diff options
Diffstat (limited to 'library/alloc/src/collections/binary_heap.rs')
| -rw-r--r-- | library/alloc/src/collections/binary_heap.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/collections/binary_heap.rs b/library/alloc/src/collections/binary_heap.rs index 75720a970a3..5881f6227a0 100644 --- a/library/alloc/src/collections/binary_heap.rs +++ b/library/alloc/src/collections/binary_heap.rs @@ -1047,6 +1047,7 @@ impl<T> BinaryHeap<T> { /// /// assert_eq!(heap.len(), 2); /// ``` + #[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { self.data.len() @@ -1070,6 +1071,7 @@ impl<T> BinaryHeap<T> { /// /// assert!(!heap.is_empty()); /// ``` + #[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_empty(&self) -> bool { self.len() == 0 |
