diff --git a/src/mustatex.rs b/src/mustatex.rs index 7021eee..642eca7 100644 --- a/src/mustatex.rs +++ b/src/mustatex.rs @@ -7,20 +7,18 @@ macro_rules! mustatex { $viz mod $name { use super::*; - static mut INNER: std::sync::Mutex<$Type> = std::sync::Mutex::new($init); + static INNER: std::sync::Mutex<$Type> = std::sync::Mutex::new($init); pub fn set(x: $Type) { - unsafe { - *INNER.lock().unwrap() = x; - } + *INNER.lock().unwrap() = x; } pub fn get() -> impl std::ops::Deref { - unsafe { INNER.lock().unwrap() } + INNER.lock().unwrap() } pub fn get_mut() -> impl std::ops::DerefMut { - unsafe { INNER.lock().unwrap() } + INNER.lock().unwrap() } } )*