Replace lazy_static! with LazyLock (#6189)

* Replace `lazy_static` with `LazyLock`.

* Merge branch 'unstable' into remove-lazy-static

# Conflicts:
#	beacon_node/lighthouse_network/src/peer_manager/mod.rs

* Lint fixes.

* Merge branch 'unstable' into remove-lazy-static

# Conflicts:
#	beacon_node/beacon_chain/src/metrics.rs

* Moar lint fixes.

* Update rust version to 1.80.0.

* Merge branch 'unstable' into remove-lazy-static
This commit is contained in:
Jimmy Chen
2024-07-29 21:42:31 +10:00
committed by GitHub
parent 00038dae81
commit 96b00ef66c
85 changed files with 3512 additions and 2370 deletions

View File

@@ -17,7 +17,7 @@ pub fn gather_prometheus_metrics<T: BeaconChainTypes>(
// - Statically updated: things which are only updated at the time of the scrape (used where we
// can avoid cluttering up code with metrics calls).
//
// The `lighthouse_metrics` crate has a `DEFAULT_REGISTRY` global singleton (via `lazy_static`)
// The `lighthouse_metrics` crate has a `DEFAULT_REGISTRY` global singleton
// which keeps the state of all the metrics. Dynamically updated things will already be
// up-to-date in the registry (because they update themselves) however statically updated
// things need to be "scraped".