compiler: use copied
instead of manual map
This commit is contained in:
parent
e6779d98ee
commit
27364309a5
6 changed files with 8 additions and 9 deletions
|
@ -715,7 +715,7 @@ pub trait LintContext: Sized {
|
|||
db.note("see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information");
|
||||
},
|
||||
BuiltinLintDiagnostics::UnexpectedCfgName((name, name_span), value) => {
|
||||
let possibilities: Vec<Symbol> = sess.parse_sess.check_config.expecteds.keys().map(|s| *s).collect();
|
||||
let possibilities: Vec<Symbol> = sess.parse_sess.check_config.expecteds.keys().copied().collect();
|
||||
|
||||
// Suggest the most probable if we found one
|
||||
if let Some(best_match) = find_best_match_for_name(&possibilities, name, None) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue