-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Consider using once_cell
instead of lazy_static
#124
Comments
Now that I've taken a peek at this it looks like this update would need to be made to |
Right. The main reason why I haven't done this yet is that I just don't think it matters much. And with it coming to std, doing a migration to With that said, if someone wanted to submit patches to I do expect that eventually, Real Soon Now, once |
Awesome. The changes to |
This is in general a good idea, but was motivated specifically by BurntSushi/bstr#124 PR #52
Hi @BurntSushi, I don't currently use the
unicode
feature but I am looking to do so.bstr
would be the only crate in my lockfile that useslazy_static
. There has been a lot of movement in the ecosystem to port over toonce_cell
. I personally think the API is nicer and the maintenance status is in a better spot.once_cell
has the added benefit of being slated for inclusion intostd
, which means it has the potential to simply re-export thosestd
types once they are stabilized.once_cell
's MSRV is in the 1.36 range, which is compatible with the 1.60 MSRVbstr
now has.rustc
is also suggestingonce_cell
for statics:once_cell::Lazy
for non-const statics rust-lang/rust#100507Here's some examples throughout the ecosystem:
lazy_static
withonce_cell
rust-onig/rust-onig#169lazy_static!
withonce_cell::sync::Lazy
immunant/c2rust#617lazy_static
withonce_cell
rust-lang/crates.io#5044The text was updated successfully, but these errors were encountered: