It's a little odd that they're using `lazy_static` now that OnceCell and LazyLock are in the standard library.
back
3 comments
It'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?).
Tools like GPT and Copilot still generate lazy_static a lot since it's the majority of the training data
Yeah... We might still be kinda rust noobs lol. Should clean that up.