Skip to content

Commit

Permalink
fix(LazyCell): documentation of get[_mut] was wrong
Browse files Browse the repository at this point in the history
- `LazyCell::get`: said it was returning a **mutable** reference.
- `LazyCell::get_mut`: said it was returning a reference (the mutable
  was missing).
  • Loading branch information
jalil-salame authored and gitbot committed Feb 20, 2025
1 parent 07e0a8f commit 9e58ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/cell/lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand All @@ -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
///
Expand Down

0 comments on commit 9e58ae5

Please sign in to comment.