Skip to content

Commit 31383ef

Browse files
authored
enhancement(core): const init thread locals (#15158)
checkpoint
1 parent 3eb5f56 commit 31383ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vector-core/src/metrics/recorder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use super::recency::{GenerationalStorage, Recency};
1111
use super::storage::VectorStorage;
1212
use crate::event::{Metric, MetricValue};
1313

14-
thread_local!(static LOCAL_REGISTRY: OnceCell<Registry> = OnceCell::new());
14+
thread_local!(static LOCAL_REGISTRY: OnceCell<Registry> = const { OnceCell::new() });
1515

1616
#[allow(dead_code)]
1717
pub(super) struct Registry {

0 commit comments

Comments
 (0)