about summary refs log tree commit diff
diff options
context:
space:
mode:
authoryanchith <yanchi.toth@gmail.com>2023-06-09 12:02:25 +0200
committeryanchith <yanchi.toth@gmail.com>2023-06-09 12:02:25 +0200
commit767a7119a08b51ed6fa2d4f6092418e63ce2877a (patch)
tree0fbf0e678eea6bc24553d0ef853840146aeb57d9
parent208da513ccfd042cb2df9ef12d0bc116b7b63304 (diff)
downloadrust-767a7119a08b51ed6fa2d4f6092418e63ce2877a.tar.gz
rust-767a7119a08b51ed6fa2d4f6092418e63ce2877a.zip
Pass tidy again
-rw-r--r--library/alloc/src/collections/binary_heap/mod.rs6
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