lazy_static involves macros, takes a bit longer to compile, and once_cell provides more flexible ways on the way to being added to std. Replace all usages of lazy_static with static VAR: Lazy<T>.
One potential drawback is that lazy_static supports spin-waiting on the result, while Lazy doesn't. I don't think any of the crate's usages are perf-bound by this though.
lazy_static
involves macros, takes a bit longer to compile, andonce_cell
provides more flexible ways on the way to being added tostd
. Replace all usages oflazy_static
withstatic VAR: Lazy<T>
.One potential drawback is that
lazy_static
supports spin-waiting on the result, whileLazy
doesn't. I don't think any of the crate's usages are perf-bound by this though.