net: use Box::pin instead of Pin::new(Box::new) (#1587)

This commit is contained in:
Taiki Endo 2019-09-23 01:28:55 +09:00 committed by Ivan Petkov
parent 695165feac
commit eb2d0fbcd1

View File

@ -166,10 +166,10 @@ where
OsStorage: 'static + Send + Sync + Init, OsStorage: 'static + Send + Sync + Init,
{ {
lazy_static! { lazy_static! {
static ref GLOBALS: Pin<Box<Globals>> = Pin::new(Box::new(Globals { static ref GLOBALS: Pin<Box<Globals>> = Box::pin(Globals {
extra: OsExtraData::init(), extra: OsExtraData::init(),
registry: Registry::new(OsStorage::init()), registry: Registry::new(OsStorage::init()),
})); });
} }
GLOBALS.as_ref() GLOBALS.as_ref()