From caf052cde3ae537ccedd2497081ab3911346ec89 Mon Sep 17 00:00:00 2001 From: Sunjay Varma Date: Mon, 27 Jul 2020 12:14:29 -0600 Subject: [PATCH] Removed extra variables from tests that were added to avoid must_use warnings --- tokio/tests/sync_mutex.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tokio/tests/sync_mutex.rs b/tokio/tests/sync_mutex.rs index 35aa2194686..0ddb203d86b 100644 --- a/tokio/tests/sync_mutex.rs +++ b/tokio/tests/sync_mutex.rs @@ -47,7 +47,7 @@ fn readiness() { // But once g unlocks, we can acquire it drop(g); assert!(t2.is_woken()); - let _g = assert_ready!(t2.poll()); + assert_ready!(t2.poll()); } /* @@ -93,7 +93,7 @@ async fn aborted_future_1() { timeout(Duration::from_millis(1u64), async move { let iv = interval(Duration::from_millis(1000)); tokio::pin!(iv); - let _g = m2.lock().await; + m2.lock().await; iv.as_mut().tick().await; iv.as_mut().tick().await; }) @@ -102,7 +102,7 @@ async fn aborted_future_1() { } // This should succeed as there is no lock left for the mutex. timeout(Duration::from_millis(1u64), async move { - let _g = m1.lock().await; + m1.lock().await; }) .await .expect("Mutex is locked"); @@ -120,7 +120,7 @@ async fn aborted_future_2() { let m2 = m1.clone(); // Try to lock mutex in a future that is aborted prematurely timeout(Duration::from_millis(1u64), async move { - let _g = m2.lock().await; + m2.lock().await; }) .await .unwrap_err(); @@ -128,7 +128,7 @@ async fn aborted_future_2() { } // This should succeed as there is no lock left for the mutex. timeout(Duration::from_millis(1u64), async move { - let _g = m1.lock().await; + m1.lock().await; }) .await .expect("Mutex is locked");