Skip to content

Commit

Permalink
enhancement(core): const init thread locals (#15158)
Browse files Browse the repository at this point in the history
checkpoint
  • Loading branch information
arshiyasolei authored Nov 9, 2022
1 parent 3eb5f56 commit 31383ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vector-core/src/metrics/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use super::recency::{GenerationalStorage, Recency};
use super::storage::VectorStorage;
use crate::event::{Metric, MetricValue};

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

#[allow(dead_code)]
pub(super) struct Registry {
Expand Down

0 comments on commit 31383ef

Please sign in to comment.