mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
d7febd4f3e
lazy_static has better ergonomics at the call/access sites (it returns a reference to the type directly, whereas with once_cell we get a static Lazy<T> that we must dereference instead) but the once_cell api is slated for integration into the standard library [0] and has been the "preferred" way to declare static global variables w/ deferred initialization. It's also less opaque and easier to comprehend how it works, I guess? (Both `once_cell` and `lazy_static` are already in our dependency tree, so this should have no detrimental effect on build times. It actually negligibly *improves* build times by not using macros, reducing the amount of expansion the compiler has to do by a miniscule amount.) [0]: https://github.com/rust-lang/rust/issues/74465 |
||
---|---|---|
.. | ||
src | ||
widestring-suffix | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml |