Skip to content

Commit 303203f

Browse files
committed
Mention Arc::make_mut and Rc::make_mut in the documentation of Cow
1 parent aef92d4 commit 303203f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/alloc/src/borrow.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ where
103103
/// is desired, `to_mut` will obtain a mutable reference to an owned
104104
/// value, cloning if necessary.
105105
///
106+
/// If you need reference-counting pointers, note that
107+
/// [`Rc::make_mut`][crate::rc::Rc::make_mut] and
108+
/// [`Arc::make_mut`][crate::sync::Arc::make_mut] can provide clone-on-write
109+
/// functionality as well.
110+
///
106111
/// # Examples
107112
///
108113
/// ```

0 commit comments

Comments
 (0)