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 once_cell::sync::Lazy with std::cell::LazyCell once it's stable #453

Open
neysofu opened this issue Jul 4, 2023 · 3 comments
Open
Assignees

Comments

@neysofu
Copy link
Member

neysofu commented Jul 4, 2023

We depend on once_cell for initialization of static items in the sov_schema_db crate, but we may be able to remove that dependency as std has std::cell::LazyCell, which is functionally equivalent (still unstable, though). While we could opt-in into the feature with #![feature(lazy_cell)], I don't really see a point –we wouldn't even remove once_cell from our dependency tree, just as a direct dependency– but let's make a note of switching away from once_cell when std has everything we need stabilized.

@neysofu neysofu self-assigned this Jul 4, 2023
@neysofu neysofu changed the title Replace once_cell::sync::Lazy with std::cel::LazyCell once it's stable Replace once_cell::sync::Lazy with std::cell::LazyCell once it's stable Jul 4, 2023
@citizen-stig
Copy link
Member

citizen-stig commented Jul 4, 2023

That would be good idea, but we need to wait for stabilization #29

Do you have link to RFC about it, so we can easily track when it lands on stable?

@citizen-stig
Copy link
Member

rust-lang/rust#109736

@kzhui125
Copy link

kzhui125 commented Jul 27, 2024

LazyLock stabilized in 1.80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants