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.
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 soonLazy
will be included as well https://github.com/rust-lang/rust/issues/74465I took a look over the current lazy static initialization of variables and changed
lazy_static
intoonce_cell
and changed some small variables to be just static instead of lazily static.