Skip to content

Commit 4d8ec9f

Browse files
fixup! Move first OnceLock example to LazyLock
1 parent 5ed5bb8 commit 4d8ec9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sync/lazy_lock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ union Data<T, F> {
3535
/// // n.b. static items do not call [`Drop`] on program termination, so this won't be deallocated.
3636
/// // this is fine, as the OS can deallocate the terminated program faster than we can free memory
3737
/// // but tools like valgrind might report "memory leaks" as it isn't obvious this is intentional.
38-
/// static DEEP_THOUGHT: LazyLock<String, fn() -> String> = LazyLock::new(|| {
38+
/// static DEEP_THOUGHT: LazyLock<String> = LazyLock::new(|| {
3939
/// # mod another_crate {
4040
/// # pub fn great_question() -> String { "42".to_string() }
4141
/// # }

0 commit comments

Comments
 (0)