Skip to content

Commit

Permalink
Merge pull request #69 from async-rs/cargo-fix
Browse files Browse the repository at this point in the history
apply automated cargo clippy --fix
  • Loading branch information
yoshuawuyts authored Feb 22, 2024
2 parents cb6f0de + 19b18b4 commit 8804b75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI
on: [push, pull_request]

env:
RUSTFLAGS: -Dwarnings
# env:
# RUSTFLAGS: -Dwarnings

jobs:
test:
Expand All @@ -11,10 +11,7 @@ jobs:
strategy:
matrix:
rust:
- 1.39.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@master
- name: Install Rust
Expand Down
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 8804b75

Please sign in to comment.