Issues with readonly_write_lock
#12733
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
We had our pipelines failing due to
clippy::readonly_write_lock
We use read write locks, and maybe we are using it in a wrong way
Lint Name
readonly_write_lock
Reproducer
I tried this code with @sigilioso:
I saw this happen:
I do not expect any error, since we are using the
rw_lock
not to lock a specific piece of data, but a piece of code through_read_guard/_write_guard
.For this reason having a lock as
RwLock<()>
would always provide a similar error, since there is nothing to writeVersion
Additional Labels
No response
The text was updated successfully, but these errors were encountered: