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
/// that compare as equal).
/// Returns `true` if the two `Weak`s point to the same value (not just
/// values that compare as equal), or if both don't point to any value
/// (because they were created with `Weak::new()`).
///
/// # 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
/// that compare as equal).
/// Returns `true` if the two `Weak`s point to the same value (not just
/// values that compare as equal), or if both don't point to any value
/// (because they were created with `Weak::new()`).
///
/// # Notes
///
/// Since this compares pointers it means that `Weak::new()` will equal each
/// other, even though they don't point to any value.
///
///
/// # Examples
///
/// ```