diff options
| -rw-r--r-- | library/alloc/src/collections/binary_heap/mod.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index 9c2588c26b4..657c380d65d 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -538,11 +538,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> { /// otherwise it's *O*(1). #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")] pub fn peek_mut(&mut self) -> Option<PeekMut<'_, T, A>> { - if self.is_empty() { - None - } else { - Some(PeekMut { heap: self, original_len: None }) - } + if self.is_empty() { None } else { Some(PeekMut { heap: self, original_len: None }) } } /// Removes the greatest item from the binary heap and returns it, or `None` if it |
