nickspring / charset-normalizer-rs

Truly universal encoding detector in pure Rust - port of Python version
https://crates.io/crates/charset-normalizer-rs
MIT License
33 stars 3 forks source link

Change lazy_static into once_cell #36

Closed chris-ha458 closed 12 months ago

chris-ha458 commented 1 year ago

lazy_static relies on macroes and is limited in scope. once_cell is much more versatile, and will soon be included in std. OnceCell is already included inside std and soon Lazy will be included as well https://github.com/rust-lang/rust/issues/74465

I took a look over the current lazy static initialization of variables and changed lazy_static into once_cell and changed some small variables to be just static instead of lazily static.