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

Fix all clippy lints in tests #2573

Merged
merged 3 commits into from
May 31, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions ci/azure-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
cargo clippy --version
displayName: Install clippy
- script: |
cargo clippy --all --all-features
displayName: cargo clippy --all
cargo clippy --all --all-features --tests
displayName: cargo clippy --all --tests
2 changes: 1 addition & 1 deletion tokio/src/sync/tests/semaphore_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ fn close_semaphore_notifies_permit2() {
#[test]
fn cancel_acquire_releases_permits() {
let s = Semaphore::new(10);
let _permit1 = s.try_acquire(4).expect("uncontended try_acquire succeeds");
Darksonn marked this conversation as resolved.
Show resolved Hide resolved
s.try_acquire(4).expect("uncontended try_acquire succeeds");
assert_eq!(6, s.available_permits());

let mut acquire = task::spawn(s.acquire(8));
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/macros_join.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::blacklisted_name)]
use tokio::sync::oneshot;
use tokio_test::{assert_pending, assert_ready, task};

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/macros_select.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::blacklisted_name)]
use tokio::sync::{mpsc, oneshot};
use tokio::task;
use tokio_test::{assert_ok, assert_pending, assert_ready};
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/macros_try_join.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::blacklisted_name)]
use tokio::sync::oneshot;
use tokio_test::{assert_pending, assert_ready, task};

Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/sync_mutex_owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn straight_execution() {
fn readiness() {
let l = Arc::new(Mutex::new(100));
let mut t1 = spawn(l.clone().lock_owned());
let mut t2 = spawn(l.clone().lock_owned());
let mut t2 = spawn(l.lock_owned());

let g = assert_ready!(t1.poll());

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/time_delay_queue.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::blacklisted_name)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]

Expand Down