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

Migrate Lazy Initialization from Once_Cell to Std #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gifted-s
Copy link

@Gifted-s Gifted-s commented Jul 13, 2024

What was changed

According to the official stable Rust 1.80.0 release. we now have LazyLock and LazyCell as part of the Standard Library(https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html). This PR upgrades all the once_cell::sync::Lazy to std::sync::LazyLock to ensure the code is current.

Why?

  • Keep code up to date

Warning

This should only be merged after upgrading to Rust 1.80.0 otherwise the merge will introduce a breaking change

Checklist

  • How was this tested: Still compiles.
  • Any docs updates needed: Don't think so.

@terakilobyte
Copy link
Member

@Gifted-s thanks for the PR! We'll take a look at this soon. With Rust 1.80, LazyLock and LazyCell are now mainline so we may end up going with that.

@Gifted-s
Copy link
Author

Gifted-s commented Jul 30, 2024

Thanks @terakilobyte!, I saw the update from 1.80. I will update accordingly

@Gifted-s Gifted-s force-pushed the update_static_initilization branch from 9012e04 to 9801185 Compare July 30, 2024 15:51
@Gifted-s
Copy link
Author

@terakilobyte This change is meant to be merged after the upgrade to Rust 1.80. I will make the change to other crates once this is merged.

@Gifted-s Gifted-s changed the title Remove lazy-static in favor of once_cell Migrate Lazy Initialization from Once_Cell to Std Jul 30, 2024
@pmeredit
Copy link
Collaborator

@Gifted-s This looks great! I am in favor of merging this, but I think we have to do some administration with regards to external PRs :)

@Gifted-s
Copy link
Author

@pmeredit Thanks.

@Gifted-s
Copy link
Author

@pmeredit I am open to any administrative process, let me know.

@Gifted-s
Copy link
Author

Gifted-s commented Aug 2, 2024

Hi @pmeredit, do I need to sign a CLA to contribute?

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