Skip to content

Commit f98e049

Browse files
committed
make sure thread is only spawn once
1 parent e2b6800 commit f98e049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/prof/src/recorder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn install_prometheus_recorder() -> &'static PrometheusRecorder {
2121
/// The default Prometheus recorder handle. We use a global static to ensure that it is only
2222
/// installed once.
2323
static PROMETHEUS_RECORDER_HANDLE: LazyLock<PrometheusRecorder> =
24-
LazyLock::new(|| PrometheusRecorder::new());
24+
LazyLock::new(PrometheusRecorder::new);
2525

2626
pub struct PrometheusRecorder {
2727
handle: Arc<PrometheusHandle>,

0 commit comments

Comments
 (0)