Skip to content

Commit b5d8108

Browse files
committed
use braces to make operator precedence less ambiguous
1 parent c26749c commit b5d8108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/locks/queue_rwlock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl RwLock {
341341
node.tail.set((state.addr() & QUEUED == 0).then_some(NonNull::from(&node)));
342342

343343
let next = ptr::from_ref(&node)
344-
.map_addr(|addr| addr | QUEUED | state.addr() & LOCKED)
344+
.map_addr(|addr| addr | QUEUED | (state.addr() & LOCKED))
345345
as State;
346346
// Use release ordering to propagate our changes to the waking
347347
// thread.

0 commit comments

Comments
 (0)