fish-shell/fish-rust
Mahmoud Al-Qudsi d7febd4f3e Use once_cell instead of lazy_static
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
2023-02-05 17:58:33 -06:00
..
src Use once_cell instead of lazy_static 2023-02-05 17:58:33 -06:00
widestring-suffix Initial Rust commit 2023-02-02 19:34:47 -07:00
build.rs rust: fix issues reported by clippy 2023-02-05 11:57:25 +01:00
Cargo.lock Use once_cell instead of lazy_static 2023-02-05 17:58:33 -06:00
Cargo.toml Use once_cell instead of lazy_static 2023-02-05 17:58:33 -06:00