Auto merge of #16920 - Veykril:clippy-lints, r=Veykril

internal: Fix new nightly clippy lints
This commit is contained in:
bors 2024-04-01 16:00:18 +00:00
commit 3691380c35
33 changed files with 31 additions and 42 deletions

View file

@ -101,7 +101,7 @@ pub(super) fn try_expr(
if let Some((inner, body)) = error_type_args {
inner_ty = inner;
body_ty = body;
s = "Try Error".to_owned();
"Try Error".clone_into(&mut s);
}
}
}
@ -637,7 +637,7 @@ fn closure_ty(
})
.join("\n");
if captures_rendered.trim().is_empty() {
captures_rendered = "This closure captures nothing".to_owned();
"This closure captures nothing".clone_into(&mut captures_rendered);
}
let mut targets: Vec<hir::ModuleDef> = Vec::new();
let mut push_new_def = |item: hir::ModuleDef| {