From 4010335c84517571e9b2d13f66f7c72170493622 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jun 2020 20:38:02 +0900 Subject: chore: fix ci failure on master (#2593) * Fix clippy warnings * Pin rustc version to 1.43.1 in macOS Refs: https://github.com/rust-lang/rust/issues/73030 --- tokio/tests/rt_basic.rs | 2 +- tokio/tests/task_local_set.rs | 2 +- tokio/tests/tcp_accept.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tokio/tests') diff --git a/tokio/tests/rt_basic.rs b/tokio/tests/rt_basic.rs index b9e373b8..9a1a432e 100644 --- a/tokio/tests/rt_basic.rs +++ b/tokio/tests/rt_basic.rs @@ -65,7 +65,7 @@ fn no_extra_poll() { let mut rt = rt(); - rt.spawn(async move { while let Some(_) = rx.next().await {} }); + rt.spawn(async move { while rx.next().await.is_some() {} }); rt.block_on(async { tokio::task::yield_now().await; }); diff --git a/tokio/tests/task_local_set.rs b/tokio/tests/task_local_set.rs index 38c7c939..bf80b8ee 100644 --- a/tokio/tests/task_local_set.rs +++ b/tokio/tests/task_local_set.rs @@ -365,7 +365,7 @@ fn drop_cancels_remote_tasks() { let mut rt = rt(); let local = LocalSet::new(); - local.spawn_local(async move { while let Some(_) = rx.recv().await {} }); + local.spawn_local(async move { while rx.recv().await.is_some() {} }); local.block_on(&mut rt, async { time::delay_for(Duration::from_millis(1)).await; }); diff --git a/tokio/tests/tcp_accept.rs b/tokio/tests/tcp_accept.rs index ff62fb96..f7ccd7f4 100644 --- a/tokio/tests/tcp_accept.rs +++ b/tokio/tests/tcp_accept.rs @@ -80,7 +80,7 @@ async fn no_extra_poll() { s: listener.incoming(), }; assert_ok!(tx.send(Arc::clone(&incoming.npolls))); - while let Some(_) = incoming.next().await { + while incoming.next().await.is_some() { accepted_tx.send(()).unwrap(); } }); -- cgit v1.2.3