Skip to content

Commit

Permalink
apply automated cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Feb 22, 2024
1 parent cb6f0de commit 82e2f0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/native/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl Future for Delay {
return Poll::Ready(());
}

state.waker.register(&cx.waker());
state.waker.register(cx.waker());

// Now that we've registered, do the full check of our own internal
// state. If we've fired the first bit is set, and if we've been
Expand Down
6 changes: 3 additions & 3 deletions src/native/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<T: Ord> Heap<T> {

pub fn peek(&self) -> Option<&T> {
self.assert_consistent();
self.items.get(0).map(|i| &i.0)
self.items.first().map(|i| &i.0)
}

pub fn pop(&mut self) -> Option<T> {
Expand Down Expand Up @@ -191,7 +191,7 @@ impl<T: Ord> Heap<T> {
}
}

for (i, &(ref item, _)) in self.items.iter().enumerate() {
for (i, (item, _)) in self.items.iter().enumerate() {
if i > 0 {
assert!(*item >= self.items[(i - 1) / 2].0, "bad at index: {}", i);
}
Expand Down Expand Up @@ -272,7 +272,7 @@ mod tests {
for t in v {
h.push(t);
}
return h;
h
}

#[test]
Expand Down

0 comments on commit 82e2f0e

Please sign in to comment.