Clarifiy weak pointers being diassociated…
…noting the fact that `clone` is not called. Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
This commit is contained in:
parent
51d598ec28
commit
335bf7ca6b
2 changed files with 6 additions and 4 deletions
|
@ -1100,8 +1100,9 @@ impl<T: Clone> Rc<T> {
|
|||
/// [`clone`] the inner value to a new allocation to ensure unique ownership. This is also
|
||||
/// referred to as clone-on-write.
|
||||
///
|
||||
/// If there are no other `Rc` pointers to this allocation, then [`Weak`]
|
||||
/// pointers to this allocation will be disassociated.
|
||||
/// However, if there are no other `Rc` pointers to this allocation, but some [`Weak`]
|
||||
/// pointers, then the [`Weak`] pointers will be disassociated and the inner value will not
|
||||
/// be cloned.
|
||||
///
|
||||
/// See also [`get_mut`], which will fail rather than cloning.
|
||||
///
|
||||
|
|
|
@ -1350,8 +1350,9 @@ impl<T: Clone> Arc<T> {
|
|||
/// [`clone`] the inner value to a new allocation to ensure unique ownership. This is also
|
||||
/// referred to as clone-on-write.
|
||||
///
|
||||
/// If there are no other `Arc` pointers to this allocation, then [`Weak`]
|
||||
/// pointers to this allocation will be disassociated.
|
||||
/// However, if there are no other `Arc` pointers to this allocation, but some [`Weak`]
|
||||
/// pointers, then the [`Weak`] pointers will be disassociated and the inner value will not
|
||||
/// be cloned.
|
||||
///
|
||||
/// See also [`get_mut`], which will fail rather than cloning.
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue