rust-prometheus
rust-prometheus copied to clipboard
docs: Promote the usage of LazyLock instead of lazy_static
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.
Welcome @Expyron! It looks like this is your first PR to tikv/rust-prometheus 🎉
https://github.com/tikv/rust-prometheus/pull/556 does this plus remove the dependency on lazy_static alltogether.