diff --git a/crates/epaint/src/mutex.rs b/crates/epaint/src/mutex.rs index 2c61f038f9c..157701c2be0 100644 --- a/crates/epaint/src/mutex.rs +++ b/crates/epaint/src/mutex.rs @@ -133,14 +133,16 @@ mod rw_lock_impl { /// the feature `deadlock_detection` is turned enabled, in which case /// extra checks are added to detect deadlocks. #[derive(Default)] - pub struct RwLock(parking_lot::RwLock); + pub struct RwLock(parking_lot::RwLock); impl RwLock { #[inline(always)] pub fn new(val: T) -> Self { Self(parking_lot::RwLock::new(val)) } + } + impl RwLock { #[inline(always)] pub fn read(&self) -> RwLockReadGuard<'_, T> { parking_lot::RwLockReadGuard::map(self.0.read(), |v| v)