Skip to content

Commit 3c33838

Browse files
committed
format
1 parent 13ea138 commit 3c33838

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

library/std/src/sys/sync/rwlock/queue.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,7 @@ const MASK: usize = !(QUEUE_LOCKED | QUEUED | LOCKED);
136136
#[inline]
137137
fn write_lock(state: State) -> Option<State> {
138138
let state = state.wrapping_byte_add(LOCKED);
139-
if state.addr() & LOCKED == LOCKED {
140-
Some(state)
141-
} else {
142-
None
143-
}
139+
if state.addr() & LOCKED == LOCKED { Some(state) } else { None }
144140
}
145141

146142
/// Marks the state as read-locked, if possible.

0 commit comments

Comments
 (0)