diff --git a/core/src/component.rs b/core/src/component.rs index 923e72ec..29aef1bf 100644 --- a/core/src/component.rs +++ b/core/src/component.rs @@ -39,17 +39,17 @@ macro_rules! component { use std::cell::UnsafeCell; use std::sync::Mutex; -pub struct Lazy(Mutex, UnsafeCell>); +pub(crate) struct Lazy(Mutex, UnsafeCell>); unsafe impl Sync for Lazy {} unsafe impl Send for Lazy {} #[cfg_attr(feature = "cargo-clippy", allow(mutex_atomic))] impl Lazy { - pub fn new() -> Lazy { + pub(crate) fn new() -> Lazy { Lazy(Mutex::new(false), UnsafeCell::new(None)) } - pub fn get T>(&self, f: F) -> &T { + pub(crate) fn get T>(&self, f: F) -> &T { let mut inner = self.0.lock().unwrap(); if !*inner { unsafe {