diff options
| author | Jalil David Salamé Messina <jalil.salame@gmail.com> | 2024-12-18 09:37:45 +0100 |
|---|---|---|
| committer | Jalil David Salamé Messina <jalil.salame@gmail.com> | 2024-12-18 09:43:02 +0100 |
| commit | 20bff638bf45990b7d71cdc330b4f68bd4b4bc73 (patch) | |
| tree | 75c56b201ce515710f2d66b30544b231b771ea4a | |
| parent | 37e74596c0b59e81b9ac58657f92297ef4ccb7ef (diff) | |
| download | rust-20bff638bf45990b7d71cdc330b4f68bd4b4bc73.tar.gz rust-20bff638bf45990b7d71cdc330b4f68bd4b4bc73.zip | |
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).
| -rw-r--r-- | library/core/src/cell/lazy.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index 5ac33516684..84cbbc71f40 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -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 /// |
