Skip to content

Commit 702c9af

Browse files
committed
fmt
1 parent 82cb15e commit 702c9af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: library/std/src/sys/sync/rwlock/futex.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ impl RwLock {
217217
/// in at least 2 threads will deadlock.
218218
#[inline]
219219
pub unsafe fn try_upgrade(&self) -> bool {
220-
debug_assert!(is_read_locked(self.state), "RwLock must be read locked to call `try_upgrade`");
220+
debug_assert!(
221+
is_read_locked(self.state), "\
222+
RwLock must be read locked to call `try_upgrade`"
223+
);
221224
self.state.compare_exchange(READ_LOCKED, WRITE_LOCKED, Acquire, Relaxed).is_ok()
222225
}
223226

0 commit comments

Comments
 (0)