Replace push loops with collect() and extend() where possible
This commit is contained in:
parent
a5c2d0fffa
commit
59c8a279da
28 changed files with 101 additions and 150 deletions
|
|
@ -203,9 +203,7 @@ pub fn run_core(search_paths: SearchPaths,
|
|||
intra_link_resolution_failure_name.to_owned(),
|
||||
missing_docs.to_owned()];
|
||||
|
||||
for (lint, _) in &cmd_lints {
|
||||
whitelisted_lints.push(lint.clone());
|
||||
}
|
||||
whitelisted_lints.extend(cmd_lints.iter().map(|(lint, _)| lint).cloned());
|
||||
|
||||
let lints = lint::builtin::HardwiredLints.get_lints()
|
||||
.into_iter()
|
||||
|
|
|
|||
|
|
@ -722,9 +722,7 @@ where R: 'static + Send,
|
|||
},
|
||||
_ => continue,
|
||||
};
|
||||
for p in value.as_str().split_whitespace() {
|
||||
sink.push(p.to_string());
|
||||
}
|
||||
sink.extend(value.as_str().split_whitespace().map(|p| p.to_string()));
|
||||
}
|
||||
|
||||
if attr.is_word() && name == Some("document_private_items") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue