4 ms·
It's a little odd that they're using `lazy_static` now that OnceCell and LazyLock are in the standard library.
by claytonwramsey 2y ago
It's a little odd that they're using `lazy_static` now that OnceCell and LazyLock are in the standard library.
- skeptrune 2y agoYeah... We might still be kinda rust noobs lol. Should clean that up.
- chucksmash 2y agoIt's not that weird considering LazyLock has only been in stable Rust since 1.80.0, which is only ~6 weeks old! It's a great tip though. As an out of the loop/casual Rust programmer who has internalized using `lazy_static!` for this purpose, I probably never would have noticed this update short of lazy_static throwing compiler warnings directing me to use the std lib equivalents (so...maybe never?).
- gamegoblin 2y agoTools like GPT and Copilot still generate lazy_static a lot since it's the majority of the training data