We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e89f9c1 commit 26c35a4Copy full SHA for 26c35a4
library/std/src/sys/sync/rwlock/queue.rs
@@ -134,11 +134,7 @@ const MASK: usize = !(QUEUE_LOCKED | QUEUED | LOCKED);
134
#[inline]
135
fn write_lock(state: State) -> Option<State> {
136
let state = state.wrapping_byte_add(LOCKED);
137
- if state.addr() & LOCKED == LOCKED {
138
- Some(state)
139
- } else {
140
- None
141
- }
+ if state.addr() & LOCKED == LOCKED { Some(state) } else { None }
142
}
143
144
/// Marks the state as read-locked, if possible.
0 commit comments