Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply automated cargo clippy --fix #69

Merged
merged 7 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
@@ -11,10 +11,7 @@ jobs:
strategy:
matrix:
rust:
- 1.39.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@master
- name: Install Rust
2 changes: 1 addition & 1 deletion src/native/delay.rs
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions src/native/heap.rs
Original file line number Diff line number Diff line change
@@ -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> {
@@ -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);
}
@@ -272,7 +272,7 @@ mod tests {
for t in v {
h.push(t);
}
return h;
h
}

#[test]