diff --git a/src/userdata.rs b/src/userdata.rs index 884f259..be2dad0 100755 --- a/src/userdata.rs +++ b/src/userdata.rs @@ -287,4 +287,11 @@ impl<'a, T: Userdata> FromLua<'a> for &'a T { let ud = val.into_userdata()?; ud.as_ref::() } +} + +impl<'a, T: Userdata> FromLua<'a> for &'a mut T { + fn from_lua(_lua: &'a State, val: Value<'a>) -> crate::Result { + let ud = val.into_userdata()?; + ud.as_mut::() + } } \ No newline at end of file