Skip to content

Commit f8fa614

Browse files
committed
Auto merge of #31397 - bradfirj:arc-docfix, r=steveklabnik
The documentation for the `make_mut` function on `Arc<T>` contains a somewhat impenetrable double-negative that I was only able to fully grasp by looking at the implementation. Here's a quick rewrite that reads a lot better. The sentence "doesn't have one strong reference and no weak references." is a hard to understand, and it can be much more easily explained. In particular, such a double-negative could give English as a Second Language users even more trouble than native speakers. r? @steveklabnik
2 parents efdde24 + 3cafce6 commit f8fa614

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/liballoc/arc.rs

+3-3
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)