regex icon indicating copy to clipboard operation
regex copied to clipboard

Suggest `std::sync::LazyLock` instead of `once_cell::sync::Lazy`

Open noritada opened this issue 1 year ago • 2 comments

This PR suggests std::sync::LazyLock instead of once_cell::sync::Lazy.

This issue was discussed three months ago right after the stabilization of std::sync::LazyLock in Rust 1.80, and since two more minor versions of Rust have been released since then, I think it's about time.

Many thanks,

Closes #1217

noritada avatar Nov 03 '24 11:11 noritada

thx!! Do we really want to mention 3rd party crates when the exact same functionality is available in stdlib?

nyurik avatar Jan 25 '25 06:01 nyurik

I found this PR (eventually) because clippy now has a pedantic lint against lazy_static: https://rust-lang.github.io/rust-clippy/master/index.html#non_std_lazy_statics

Would be nice to get this landed so it's easy for folks who see that lint to update.

gibfahn avatar Jan 31 '25 13:01 gibfahn