diff --git a/src/chunk.rs b/src/chunk.rs index b596b91..37176ad 100644 --- a/src/chunk.rs +++ b/src/chunk.rs @@ -481,7 +481,7 @@ impl<'a> Chunk<'a> { if let Ok(ref source) = self.source { if self.detect_mode() == ChunkMode::Text { let lua = self.lua.lock(); - if let Some(cache) = lua.app_data_ref::() { + if let Some(cache) = lua.app_data_ref_unguarded::() { if let Some(data) = cache.0.get(source.as_ref()) { self.source = Ok(Cow::Owned(data.clone())); self.mode = Some(ChunkMode::Binary); @@ -498,7 +498,7 @@ impl<'a> Chunk<'a> { if let Ok(ref binary_source) = self.source { if self.detect_mode() == ChunkMode::Binary { let lua = self.lua.lock(); - if let Some(mut cache) = lua.app_data_mut::() { + if let Some(mut cache) = lua.app_data_mut_unguarded::() { cache.0.insert(text_source, binary_source.as_ref().to_vec()); } else { let mut cache = ChunksCache(HashMap::new()); diff --git a/src/state/raw.rs b/src/state/raw.rs index 2c132c5..6765772 100644 --- a/src/state/raw.rs +++ b/src/state/raw.rs @@ -285,7 +285,7 @@ impl RawLua { /// See [`Lua::app_data_ref`] #[track_caller] #[inline] - pub(crate) fn app_data_ref(&self) -> Option> { + pub(crate) fn app_data_ref_unguarded(&self) -> Option> { let extra = unsafe { &*self.extra.get() }; extra.app_data.borrow(None) } @@ -293,7 +293,7 @@ impl RawLua { /// See [`Lua::app_data_mut`] #[track_caller] #[inline] - pub(crate) fn app_data_mut(&self) -> Option> { + pub(crate) fn app_data_mut_unguarded(&self) -> Option> { let extra = unsafe { &*self.extra.get() }; extra.app_data.borrow_mut(None) }