fix: Remove duplicate LazyLock
example. · qinheping/verify-rust-std@49a855d (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 49a855d
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 alilleybrinker@gmail.com
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -44,8 +44,6 @@ union Data<T, F> { | ||
44 | 44 | /// |
45 | 45 | /// // The `String` is built, stored in the `LazyLock`, and returned as `&String`. |
46 | 46 | /// let _ = &*DEEP_THOUGHT; |
47 | -/// // The `String` is retrieved from the `LazyLock` and returned as `&String`. | |
48 | -/// let _ = &*DEEP_THOUGHT; | |
49 | 47 | /// ``` |
50 | 48 | /// |
51 | 49 | /// Initialize fields with `LazyLock`. |