diff options
| author | bors <bors@rust-lang.org> | 2016-02-08 22:19:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-08 22:19:41 +0000 |
| commit | f8fa6140fa6a85ea21ef4d2d56764862f7b3728b (patch) | |
| tree | 9deb9863d8a407f3dc5e5e979810b4d9c0f9ea39 /src/liballoc | |
| parent | efdde2479b3099b35b38a7445b5f09559e3f1fd0 (diff) | |
| parent | 3cafce659642058f44b08305b115852b1bd1d1e6 (diff) | |
| download | rust-f8fa6140fa6a85ea21ef4d2d56764862f7b3728b.tar.gz rust-f8fa6140fa6a85ea21ef4d2d56764862f7b3728b.zip | |
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
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 424a689bcb0..217d9d7e077 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -380,9 +380,9 @@ impl<T: ?Sized> Deref for Arc<T> { } impl<T: Clone> Arc<T> { - /// Make a mutable reference into the given `Arc<T>` by cloning the inner - /// data if the `Arc<T>` doesn't have one strong reference and no weak - /// references. + /// Make a mutable reference into the given `Arc<T>`. + /// If the `Arc<T>` has more than one strong reference, or any weak + /// references, the inner data is cloned. /// /// This is also referred to as a copy-on-write. /// |
