Skip to content

Commit 8804b75

Browse files
authored
Merge pull request #69 from async-rs/cargo-fix
apply automated cargo clippy --fix
2 parents cb6f0de + 19b18b4 commit 8804b75

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: CI
22
on: [push, pull_request]
33

4-
env:
5-
RUSTFLAGS: -Dwarnings
4+
# env:
5+
# RUSTFLAGS: -Dwarnings
66

77
jobs:
88
test:
@@ -11,10 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
rust:
14-
- 1.39.0
1514
- stable
16-
- beta
17-
- nightly
1815
steps:
1916
- uses: actions/checkout@master
2017
- name: Install Rust

src/native/delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl Future for Delay {
116116
return Poll::Ready(());
117117
}
118118

119-
state.waker.register(&cx.waker());
119+
state.waker.register(cx.waker());
120120

121121
// Now that we've registered, do the full check of our own internal
122122
// state. If we've fired the first bit is set, and if we've been

src/native/heap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<T: Ord> Heap<T> {
6666

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

7272
pub fn pop(&mut self) -> Option<T> {
@@ -191,7 +191,7 @@ impl<T: Ord> Heap<T> {
191191
}
192192
}
193193

194-
for (i, &(ref item, _)) in self.items.iter().enumerate() {
194+
for (i, (item, _)) in self.items.iter().enumerate() {
195195
if i > 0 {
196196
assert!(*item >= self.items[(i - 1) / 2].0, "bad at index: {}", i);
197197
}
@@ -272,7 +272,7 @@ mod tests {
272272
for t in v {
273273
h.push(t);
274274
}
275-
return h;
275+
h
276276
}
277277

278278
#[test]

0 commit comments

Comments
 (0)