2020-01-28 03:28:11 -06:00
|
|
|
#![warn(clippy::let_underscore_lock)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let m = std::sync::Mutex::new(());
|
|
|
|
let rw = std::sync::RwLock::new(());
|
|
|
|
|
|
|
|
let _ = m.lock();
|
|
|
|
let _ = rw.read();
|
|
|
|
let _ = rw.write();
|
2020-01-30 09:10:19 -06:00
|
|
|
let _ = m.try_lock();
|
|
|
|
let _ = rw.try_read();
|
|
|
|
let _ = rw.try_write();
|
2020-01-28 03:28:11 -06:00
|
|
|
}
|