mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
Pass tidy again
This commit is contained in:
parent
208da513cc
commit
767a7119a0
@ -538,11 +538,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
|
|||||||
/// otherwise it's *O*(1).
|
/// otherwise it's *O*(1).
|
||||||
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
|
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
|
||||||
pub fn peek_mut(&mut self) -> Option<PeekMut<'_, T, A>> {
|
pub fn peek_mut(&mut self) -> Option<PeekMut<'_, T, A>> {
|
||||||
if self.is_empty() {
|
if self.is_empty() { None } else { Some(PeekMut { heap: self, original_len: None }) }
|
||||||
None
|
|
||||||
} else {
|
|
||||||
Some(PeekMut { heap: self, original_len: None })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes the greatest item from the binary heap and returns it, or `None` if it
|
/// Removes the greatest item from the binary heap and returns it, or `None` if it
|
||||||
|
Loading…
Reference in New Issue
Block a user