about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorRichard Bradfield <bradfirj@fstab.me>2016-02-03 22:18:04 +0000
committerRichard Bradfield <bradfirj@fstab.me>2016-02-04 09:25:03 +0000
commit3cafce659642058f44b08305b115852b1bd1d1e6 (patch)
tree8ee46f979ddedbe4ee399052e1bc275342f5514e /src/liballoc
parent8fc73c703ab175577346773ad93de3aa2c3f44a2 (diff)
downloadrust-3cafce659642058f44b08305b115852b1bd1d1e6.tar.gz
rust-3cafce659642058f44b08305b115852b1bd1d1e6.zip
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.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs6
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.
     ///