1
Fork 0

Update {rc, sync}::Weak::ptr_eq doc about comparing Weak::new

This commit is contained in:
Thomas de Zeeuw 2019-08-25 13:02:45 +02:00
parent d86516d91e
commit 307804a00d
2 changed files with 6 additions and 5 deletions

View file

@ -1832,8 +1832,9 @@ impl<T: ?Sized> Weak<T> {
} }
} }
/// Returns `true` if the two `Weak`s point to the same value (not just values /// Returns `true` if the two `Weak`s point to the same value (not just
/// that compare as equal). /// values that compare as equal), or if both don't point to any value
/// (because they were created with `Weak::new()`).
/// ///
/// # Notes /// # Notes
/// ///

View file

@ -1550,15 +1550,15 @@ impl<T: ?Sized> Weak<T> {
} }
} }
/// Returns `true` if the two `Weak`s point to the same value (not just values /// Returns `true` if the two `Weak`s point to the same value (not just
/// that compare as equal). /// values that compare as equal), or if both don't point to any value
/// (because they were created with `Weak::new()`).
/// ///
/// # Notes /// # Notes
/// ///
/// Since this compares pointers it means that `Weak::new()` will equal each /// Since this compares pointers it means that `Weak::new()` will equal each
/// other, even though they don't point to any value. /// other, even though they don't point to any value.
/// ///
///
/// # Examples /// # Examples
/// ///
/// ``` /// ```