error: non-binding let on a synchronization lock
--> src/catfs/file.rs:570:13
|
570 | let _ = self.page_in_res.0.lock().unwrap();
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this binding will immediately drop the value assigned to it
| |
| this lock is not assigned to a binding and is immediately dropped
|
= note: `#[deny(let_underscore_lock)]` on by default
help: consider binding to an unused variable to avoid immediately dropping the value
|
570 | let _unused = self.page_in_res.0.lock().unwrap();
| ~~~~~~~
help: consider immediately dropping the value
|
570 | drop(self.page_in_res.0.lock().unwrap());
| ~~~~~ +
(Ignore the line numbers as they correspond to an older version, but I was able to verify it still occurs in v0.9.0 and the code triggering the error still exists.)
I was planning to fix this, but I can't figure out what the purpose of that line is. Is this mutex being used to gate access to more things than its internal data?
Due to a new lint in rust 1.65 introduced by https://github.com/rust-lang/rust/pull/97739, there is a new compilation error:
(Ignore the line numbers as they correspond to an older version, but I was able to verify it still occurs in v0.9.0 and the code triggering the error still exists.)
I was planning to fix this, but I can't figure out what the purpose of that line is. Is this mutex being used to gate access to more things than its internal data?