2020-10-02 10:54:44 +08:00
|
|
|
error: calling `&mut Mutex::lock` unnecessarily locks an exclusive (mutable) reference
|
2020-10-10 18:07:47 +08:00
|
|
|
--> $DIR/mut_mutex_lock.rs:11:33
|
2020-10-02 09:05:30 +08:00
|
|
|
|
|
2020-10-02 10:54:44 +08:00
|
|
|
LL | let mut value = value_mutex.lock().unwrap();
|
2020-10-10 18:07:47 +08:00
|
|
|
| ^^^^ help: change this to: `get_mut`
|
2020-10-02 09:05:30 +08:00
|
|
|
|
|
2020-10-02 10:54:44 +08:00
|
|
|
= note: `-D clippy::mut-mutex-lock` implied by `-D warnings`
|
2020-10-02 09:05:30 +08:00
|
|
|
|
2020-10-02 10:54:44 +08:00
|
|
|
error: aborting due to previous error
|
2020-10-02 09:05:30 +08:00
|
|
|
|