rust-prometheus icon indicating copy to clipboard operation
rust-prometheus copied to clipboard

docs: Promote the usage of LazyLock instead of lazy_static

Open Expyron opened this issue 8 months ago • 2 comments

Since Rust 1.80, the recommended way to have lazily-initialized statics is to use LazyLock.

As this crate's MSRV is 1.81, this PR updates the documentation to encourage that new usage.

This is a change to examples and documentation only. Once this PR is merged, I'll make another PR updating the internal uses of lazy_static within this crate.

Expyron avatar Jun 15 '25 15:06 Expyron

Welcome @Expyron! It looks like this is your first PR to tikv/rust-prometheus 🎉

ti-chi-bot[bot] avatar Jun 15 '25 15:06 ti-chi-bot[bot]

https://github.com/tikv/rust-prometheus/pull/556 does this plus remove the dependency on lazy_static alltogether.

ThomasHabets avatar Oct 13 '25 23:10 ThomasHabets