fix(LazyCell): documentation of get[_mut] was wrong

- `LazyCell::get`: said it was returning a **mutable** reference.
- `LazyCell::get_mut`: said it was returning a reference (the mutable
  was missing).
This commit is contained in:
Jalil David Salamé Messina 2024-12-18 09:37:45 +01:00
parent 37e74596c0
commit 20bff638bf
No known key found for this signature in database
GPG key ID: F016B9E770737A0B

View file

@ -219,7 +219,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
}
impl<T, F> LazyCell<T, F> {
/// Returns a reference to the value if initialized, or `None` if not.
/// Returns a mutable reference to the value if initialized, or `None` if not.
///
/// # Examples
///
@ -245,7 +245,7 @@ impl<T, F> LazyCell<T, F> {
}
}
/// Returns a mutable reference to the value if initialized, or `None` if not.
/// Returns a reference to the value if initialized, or `None` if not.
///
/// # Examples
///