mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 10:33:27 +00:00
16 lines
592 B
Text
16 lines
592 B
Text
error: this write lock is used only for reading
|
|
--> $DIR/readonly_write_lock.rs:16:22
|
|
|
|
|
LL | let writer = lock.write().unwrap();
|
|
| ^^^^^^^^^^^^ help: consider using a read lock instead: `lock.read()`
|
|
|
|
|
= note: `-D clippy::readonly-write-lock` implied by `-D warnings`
|
|
|
|
error: this write lock is used only for reading
|
|
--> $DIR/readonly_write_lock.rs:21:22
|
|
|
|
|
LL | let writer = lock.write().unwrap();
|
|
| ^^^^^^^^^^^^ help: consider using a read lock instead: `lock.read()`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|