Skip to content

Commit

Permalink
Immediately drop lock
Browse files Browse the repository at this point in the history
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
sunjay and hawkw committed May 12, 2020
1 parent 0597f18 commit dccdd69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/tests/sync_mutex.rs
Expand Up @@ -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");
Expand Down

0 comments on commit dccdd69

Please sign in to comment.