Skip to content

Commit 3cafce6

Browse files
committed
Fix unclear make_mut docs
Changed the description of the `make_mut` copy-on-write behaviour in arc.rs The sentence "doesn't have one strong reference and no weak references." is a hard to understand double negative, which can be much more easily explained.
1 parent 8fc73c7 commit 3cafce6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/liballoc/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ impl<T: ?Sized> Deref for Arc<T> {
380380
}
381381

382382
impl<T: Clone> Arc<T> {
383-
/// Make a mutable reference into the given `Arc<T>` by cloning the inner
384-
/// data if the `Arc<T>` doesn't have one strong reference and no weak
385-
/// references.
383+
/// Make a mutable reference into the given `Arc<T>`.
384+
/// If the `Arc<T>` has more than one strong reference, or any weak
385+
/// references, the inner data is cloned.
386386
///
387387
/// This is also referred to as a copy-on-write.
388388
///

0 commit comments

Comments
 (0)