Various minor/cosmetic improvements to code
This commit is contained in:
@@ -276,7 +276,7 @@ struct RcBox<T: ?Sized> {
|
||||
/// See the [module-level documentation](./index.html) for more details.
|
||||
///
|
||||
/// The inherent methods of `Rc` are all associated functions, which means
|
||||
/// that you have to call them as e.g. [`Rc::get_mut(&mut value)`][get_mut] instead of
|
||||
/// that you have to call them as e.g., [`Rc::get_mut(&mut value)`][get_mut] instead of
|
||||
/// `value.get_mut()`. This avoids conflicts with methods of the inner
|
||||
/// type `T`.
|
||||
///
|
||||
@@ -1252,7 +1252,7 @@ impl<T: ?Sized> Weak<T> {
|
||||
}
|
||||
|
||||
/// Return `None` when the pointer is dangling and there is no allocated `RcBox`,
|
||||
/// i.e. this `Weak` was created by `Weak::new`
|
||||
/// i.e., this `Weak` was created by `Weak::new`
|
||||
#[inline]
|
||||
fn inner(&self) -> Option<&RcBox<T>> {
|
||||
if is_dangling(self.ptr) {
|
||||
|
||||
Reference in New Issue
Block a user