diff --git a/src/conversion.rs b/src/conversion.rs index 52c30d1..7424ace 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -61,7 +61,7 @@ impl<'lua> FromLua<'lua> for String<'lua> { from: value.type_name(), to: "string", message: None, - }) + }), } } } @@ -287,7 +287,11 @@ impl<'lua> FromLua<'lua> for Error { fn from_lua(value: Value<'lua>, _: &'lua Lua) -> Result { match value { Value::Error(err) => Ok(err), - _ => Err(Error::FromLuaConversionError { from: value.type_name(), to: "error", message: None }), + _ => Err(Error::FromLuaConversionError { + from: value.type_name(), + to: "error", + message: None, + }), } } } @@ -312,7 +316,11 @@ impl<'lua> FromLua<'lua> for bool { match value { Value::Nil => Ok(false), Value::Boolean(b) => Ok(b), - _ => Err(Error::FromLuaConversionError { from: value.type_name(), to: "boolean", message: None }), + _ => Err(Error::FromLuaConversionError { + from: value.type_name(), + to: "boolean", + message: None, + }), } } } @@ -324,7 +332,6 @@ impl<'lua> From for Value<'lua> { } } - impl<'lua> IntoLua<'lua> for LightUserData { #[inline] fn into_lua(self, _: &'lua Lua) -> Result> { @@ -354,7 +361,6 @@ impl<'lua> From for Value<'lua> { } } - #[cfg(feature = "luau")] impl<'lua> IntoLua<'lua> for crate::types::Vector { #[inline] @@ -439,7 +445,7 @@ impl<'lua> FromLua<'lua> for CString { to: "CString", message: Some(e.to_string()), }), - } + } } } diff --git a/src/lua.rs b/src/lua.rs index cca250c..015d846 100644 --- a/src/lua.rs +++ b/src/lua.rs @@ -1571,7 +1571,11 @@ impl Lua { /// # Safety /// This function is unsafe because provides a way to execute unsafe C function. #[inline] - pub unsafe fn create_c_closure<'lua>(&'lua self, func: ffi::lua_CFunction, upvalues: impl IntoLuaMulti<'lua>) -> Result { + pub unsafe fn create_c_closure<'lua>( + &'lua self, + func: ffi::lua_CFunction, + upvalues: impl IntoLuaMulti<'lua>, + ) -> Result { let state = self.state(); let upvalues = upvalues.into_lua_multi(self)?; let Ok(n) = i32::try_from(upvalues.len()) else { @@ -2819,7 +2823,9 @@ impl Lua { ))] unsafe { if !(*self.extra.get()).libs.contains(StdLib::COROUTINE) { - return Err(Error::RuntimeError("StdLib::COROUTINE is not loaded".to_owned())); + return Err(Error::RuntimeError( + "StdLib::COROUTINE is not loaded".to_owned(), + )); } }