diff --git a/src/runner/instance.rs b/src/runner/instance.rs index 1289826..b0719be 100644 --- a/src/runner/instance.rs +++ b/src/runner/instance.rs @@ -30,7 +30,7 @@ fn dom(lua:&mlua::Lua,mut f:impl FnMut(&mut WeakDom)->mlua::Result)->mlua: f(&mut *dom) } -fn coerce_float(value:&mlua::Value)->Option{ +fn coerce_float32(value:&mlua::Value)->Option{ match value{ &mlua::Value::Integer(i)=>Some(i as f32), &mlua::Value::Number(f)=>Some(f as f32), @@ -96,7 +96,7 @@ impl mlua::UserData for Instance{ instance.properties.insert(index_str.to_owned(),rbx_types::Variant::Vector3(typed_value.into())); }, rbx_types::Variant::Float32(_)=>{ - let typed_value:f32=coerce_float(&value).ok_or(mlua::Error::runtime("Expected f32"))?; + let typed_value:f32=coerce_float32(&value).ok_or(mlua::Error::runtime("Expected f32"))?; instance.properties.insert(index_str.to_owned(),rbx_types::Variant::Float32(typed_value)); }, other=>println!("Unimplemented property type: {other:?}"),