From 0dbba139848de6a8ee88350cc7fc48d0b05016c5 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Fri, 4 Dec 2020 10:23:13 +0100 Subject: deps: replace lazy_static with once_cell (#3187) --- tokio/src/signal/registry.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tokio/src/signal') diff --git a/tokio/src/signal/registry.rs b/tokio/src/signal/registry.rs index 5d6f608c..55ee8c53 100644 --- a/tokio/src/signal/registry.rs +++ b/tokio/src/signal/registry.rs @@ -4,7 +4,7 @@ use crate::signal::os::{OsExtraData, OsStorage}; use crate::sync::mpsc::Sender; -use lazy_static::lazy_static; +use once_cell::sync::Lazy; use std::ops; use std::pin::Pin; use std::sync::atomic::{AtomicBool, Ordering}; @@ -165,12 +165,12 @@ where OsExtraData: 'static + Send + Sync + Init, OsStorage: 'static + Send + Sync + Init, { - lazy_static! { - static ref GLOBALS: Pin> = Box::pin(Globals { + static GLOBALS: Lazy>> = Lazy::new(|| { + Box::pin(Globals { extra: OsExtraData::init(), registry: Registry::new(OsStorage::init()), - }); - } + }) + }); GLOBALS.as_ref() } -- cgit v1.2.3