From 31383efe11da5a479acd8e6b9a4c6777ae29885b Mon Sep 17 00:00:00 2001 From: Arshia Soleimani <9458000+arshiyasolei@users.noreply.github.com> Date: Wed, 9 Nov 2022 14:45:36 -0500 Subject: [PATCH] enhancement(core): const init thread locals (#15158) checkpoint --- lib/vector-core/src/metrics/recorder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vector-core/src/metrics/recorder.rs b/lib/vector-core/src/metrics/recorder.rs index 0f2be44837f89..20a8853963fd8 100644 --- a/lib/vector-core/src/metrics/recorder.rs +++ b/lib/vector-core/src/metrics/recorder.rs @@ -11,7 +11,7 @@ use super::recency::{GenerationalStorage, Recency}; use super::storage::VectorStorage; use crate::event::{Metric, MetricValue}; -thread_local!(static LOCAL_REGISTRY: OnceCell = OnceCell::new()); +thread_local!(static LOCAL_REGISTRY: OnceCell = const { OnceCell::new() }); #[allow(dead_code)] pub(super) struct Registry {