sync: add #[must_use] to lock guards (#4886)

This commit is contained in:
xxchan
2022-08-09 13:44:29 +02:00
committed by GitHub
parent 199878e287
commit ff6fbc327d
7 changed files with 20 additions and 17 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ fn mutex_blocking_lock_panic_caller() -> Result<(), Box<dyn Error>> {
let rt = basic();
rt.block_on(async {
let mutex = Mutex::new(5_u32);
mutex.blocking_lock();
let _g = mutex.blocking_lock();
});
});