Skip to content

Commit f6960cc

Browse files
fixup! Move first OnceLock example to LazyLock
1 parent 6cac580 commit f6960cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/sync/lazy_lock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ union Data<T, F> {
4444
/// });
4545
///
4646
/// // The `String` is built, stored in the `LazyLock`, and returned as `&String`.
47-
/// let _ = DEEP_THOUGHT;
47+
/// let _ = &*DEEP_THOUGHT;
4848
/// // The `String` is retrieved from the `LazyLock` and returned as `&String`.
49-
/// let _ = DEEP_THOUGHT;
49+
/// let _ = &*DEEP_THOUGHT;
5050
/// ```
5151
///
5252
/// Initialize fields with `LazyLock`.

0 commit comments

Comments
 (0)