diff --git a/tokio/tests/sync_mutex.rs b/tokio/tests/sync_mutex.rs index 6107f8e22bd..7531da76282 100644 --- a/tokio/tests/sync_mutex.rs +++ b/tokio/tests/sync_mutex.rs @@ -127,7 +127,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; + let _ = m1.lock().await; }) .await .expect("Mutex is locked");