Skip to content

Commit 743325f

Browse files
committed
clippy
1 parent 0b365e9 commit 743325f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

mlua_derive/src/userdata/userdata_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ fn gen_field_getter(
537537
lua_attr: &LuaAttr,
538538
info: &MethodInfo,
539539
) -> TokenStream2 {
540-
let lua_name = lua_attr.name(&fn_name);
540+
let lua_name = lua_attr.name(fn_name);
541541
let call_args = gen_call_args(info);
542542

543543
if lua_attr.infallible {

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl fmt::Display for Error {
290290
// Try to find local traceback within the full traceback
291291
if let Some(pos) = full_traceback.find(traceback) {
292292
write!(fmt, "{}", &full_traceback[..pos])?;
293-
writeln!(fmt, ">{}", &full_traceback[pos..].trim_end())?;
293+
writeln!(fmt, ">{}", full_traceback[pos..].trim_end())?;
294294
} else {
295295
writeln!(fmt, "{}", full_traceback.trim_end())?;
296296
}

src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ impl Lua {
881881
#[cfg(feature = "luau")]
882882
{
883883
let proc = Self::userthread_proc as _;
884-
(*ffi::lua_callbacks(lua.main_state())).userthread = triggers.on_create.then(|| proc);
884+
(*ffi::lua_callbacks(lua.main_state())).userthread = triggers.on_create.then_some(proc);
885885
}
886886
}
887887
}

0 commit comments

Comments
 (0)