Consider using once_cell
instead of lazy_static
#124
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
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: