From 23e4e98d2c2fb441e1af7764be3919649d18912a Mon Sep 17 00:00:00 2001 From: Andrew Lilley Brinker Date: Mon, 16 Sep 2024 14:21:05 -0700 Subject: [PATCH] fix: Remove duplicate `LazyLock` example. The top-level docs for `LazyLock` included two lines of code, each with an accompanying comment, that were identical and with nearly- identical comments. This looks like an oversight from a past edit which was perhaps trying to rewrite an existing example but ended up duplicating rather than replacing, though I haven't gone back through the Git history to check. This commit removes what I personally think is the less-clear of the two examples. Signed-off-by: Andrew Lilley Brinker --- library/std/src/sync/lazy_lock.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/std/src/sync/lazy_lock.rs b/library/std/src/sync/lazy_lock.rs index 953aef40e7b..1dfe1dc538b 100644 --- a/library/std/src/sync/lazy_lock.rs +++ b/library/std/src/sync/lazy_lock.rs @@ -44,8 +44,6 @@ union Data { /// /// // The `String` is built, stored in the `LazyLock`, and returned as `&String`. /// let _ = &*DEEP_THOUGHT; -/// // The `String` is retrieved from the `LazyLock` and returned as `&String`. -/// let _ = &*DEEP_THOUGHT; /// ``` /// /// Initialize fields with `LazyLock`.