roblox_emulator: deref returns correct type

This commit is contained in:
Quaternions 2025-01-08 23:31:56 -08:00
parent 08f419f931
commit 6ff74f08ab

View File

@ -33,7 +33,7 @@ pub fn set_globals(lua:&mlua::Lua,globals:&mlua::Table)->Result<(),mlua::Error>{
// LMAO look at this function!
pub fn dom_mut<T>(lua:&mlua::Lua,mut f:impl FnMut(&mut WeakDom)->mlua::Result<T>)->mlua::Result<T>{
let mut dom=lua.app_data_mut::<&'static mut WeakDom>().ok_or_else(||mlua::Error::runtime("DataModel missing"))?;
f(&mut *dom)
f(*dom)
}
fn coerce_float32(value:&mlua::Value)->Option<f32>{