Skip to content

Commit 0d0abf2

Browse files
author
Gianmarco Garrisi
committed
fmt
1 parent 2f63793 commit 0d0abf2

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/double_priority_queue/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ where
315315
/// let mut iter_mut = unsafe { pq.iter_mut() };
316316
/// iter_mut.next().unwrap()
317317
/// };
318-
///
318+
///
319319
/// *prio = 3;
320320
/// ```
321321
pub unsafe fn iter_mut(&mut self) -> IterMut<'_, I, P, H> {

src/priority_queue/iterators.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ where
185185
return None;
186186
}
187187

188-
let r: Option<(&mut I, &mut P)> = self.pq
188+
let r: Option<(&mut I, &mut P)> = self
189+
.pq
189190
.store
190191
.map
191192
.get_index_mut2(self.pos)

src/priority_queue/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ where
319319
/// let mut iter_mut = unsafe { pq.iter_mut() };
320320
/// iter_mut.next().unwrap()
321321
/// };
322-
///
322+
///
323323
/// *prio = 3;
324324
/// ```
325325
pub unsafe fn iter_mut(&mut self) -> IterMut<'_, I, P, H> {

tests/double_priority_queue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ mod doublepq_tests {
808808

809809
assert_eq!(pq.pop_max(), Some(("b", 20)));
810810

811-
assert_eq!(unsafe{pq.iter_mut()}.rev().count(), 4);
811+
assert_eq!(unsafe { pq.iter_mut() }.rev().count(), 4);
812812

813813
/*
814814
// As expected, this does not compile
@@ -827,7 +827,7 @@ mod doublepq_tests {
827827
pq.push("g", 4);
828828
pq.push("h", 3);
829829

830-
let mut iter = unsafe {pq.iter_mut()};
830+
let mut iter = unsafe { pq.iter_mut() };
831831
assert_eq!(iter.next_back(), Some((&mut "h", &mut 3)));
832832
}
833833

0 commit comments

Comments
 (0)