mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
clippy
This commit is contained in:
@@ -537,7 +537,7 @@ fn gen_field_getter(
|
||||
lua_attr: &LuaAttr,
|
||||
info: &MethodInfo,
|
||||
) -> TokenStream2 {
|
||||
let lua_name = lua_attr.name(&fn_name);
|
||||
let lua_name = lua_attr.name(fn_name);
|
||||
let call_args = gen_call_args(info);
|
||||
|
||||
if lua_attr.infallible {
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ impl fmt::Display for Error {
|
||||
// Try to find local traceback within the full traceback
|
||||
if let Some(pos) = full_traceback.find(traceback) {
|
||||
write!(fmt, "{}", &full_traceback[..pos])?;
|
||||
writeln!(fmt, ">{}", &full_traceback[pos..].trim_end())?;
|
||||
writeln!(fmt, ">{}", full_traceback[pos..].trim_end())?;
|
||||
} else {
|
||||
writeln!(fmt, "{}", full_traceback.trim_end())?;
|
||||
}
|
||||
|
||||
+1
-1
@@ -881,7 +881,7 @@ impl Lua {
|
||||
#[cfg(feature = "luau")]
|
||||
{
|
||||
let proc = Self::userthread_proc as _;
|
||||
(*ffi::lua_callbacks(lua.main_state())).userthread = triggers.on_create.then(|| proc);
|
||||
(*ffi::lua_callbacks(lua.main_state())).userthread = triggers.on_create.then_some(proc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user