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

@ -84,7 +84,7 @@ impl CommentBlock {
panic!("Use plain (non-doc) comments with tags like {tag}:\n {first}");
}
block.id = id.trim().to_owned();
id.trim().clone_into(&mut block.id);
true
});
blocks

View file

@ -280,7 +280,7 @@ fn generate_descriptor_clippy(buf: &mut String, path: &Path) {
let line = &line[..up_to];
let clippy_lint = clippy_lints.last_mut().expect("clippy lint must already exist");
clippy_lint.help = unescape(line).trim().to_owned();
unescape(line).trim().clone_into(&mut clippy_lint.help);
}
}
clippy_lints.sort_by(|lint, lint2| lint.id.cmp(&lint2.id));