Skip to content

Commit 6064862

Browse files
authored
Rollup merge of #150035 - agavra:patch-1, r=Mark-Simulacrum
fix docustring on fetch_or The documentation had the same example twice in a row, but I think this was the intended second example.
2 parents 2e054a1 + 3493f8c commit 6064862

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/sync/atomic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,8 @@ impl AtomicBool {
11511151
/// assert_eq!(foo.fetch_or(false, Ordering::SeqCst), true);
11521152
/// assert_eq!(foo.load(Ordering::SeqCst), true);
11531153
///
1154-
/// let foo = AtomicBool::new(true);
1155-
/// assert_eq!(foo.fetch_or(true, Ordering::SeqCst), true);
1154+
/// let foo = AtomicBool::new(false);
1155+
/// assert_eq!(foo.fetch_or(true, Ordering::SeqCst), false);
11561156
/// assert_eq!(foo.load(Ordering::SeqCst), true);
11571157
///
11581158
/// let foo = AtomicBool::new(false);

0 commit comments

Comments
 (0)