Skip to content

Commit 20bff63

Browse files
committed
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).
1 parent 37e7459 commit 20bff63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: library/core/src/cell/lazy.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
219219
}
220220

221221
impl<T, F> LazyCell<T, F> {
222-
/// Returns a reference to the value if initialized, or `None` if not.
222+
/// Returns a mutable reference to the value if initialized, or `None` if not.
223223
///
224224
/// # Examples
225225
///
@@ -245,7 +245,7 @@ impl<T, F> LazyCell<T, F> {
245245
}
246246
}
247247

248-
/// Returns a mutable reference to the value if initialized, or `None` if not.
248+
/// Returns a reference to the value if initialized, or `None` if not.
249249
///
250250
/// # Examples
251251
///

0 commit comments

Comments
 (0)