Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lazy_statics with std::sync::LazyLocks #314

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

jschwe
Copy link
Member

@jschwe jschwe commented Sep 5, 2024

  • Remove one instance of a useless lazystatic (Mutex::new() is const since Rust 1.63)
  • Replace remaining instances with LazyLock and Once from the standard library as appropriate.
  • Removes the lazylock dependency.

Mutex::new() is available in const contexts since Rust 1.63, so
no lazy_static is needed.
@mrobinson mrobinson added this pull request to the merge queue Sep 5, 2024
Merged via the queue into servo:main with commit 83c1d08 Sep 5, 2024
17 checks passed
@jschwe jschwe deleted the jschwender/replace_lazystatic branch September 5, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants