1
Fork 0

don't restuct references just to reborrow

This commit is contained in:
Matthias Krüger 2022-12-18 17:01:58 +01:00
parent 35a99eef32
commit a108d55ce6
22 changed files with 41 additions and 42 deletions

View file

@ -1323,7 +1323,7 @@ pub fn build_session(
let warnings_allow = sopts
.lint_opts
.iter()
.rfind(|&&(ref key, _)| *key == "warnings")
.rfind(|&(key, _)| *key == "warnings")
.map_or(false, |&(_, level)| level == lint::Allow);
let cap_lints_allow = sopts.lint_cap.map_or(false, |cap| cap == lint::Allow);
let can_emit_warnings = !(warnings_allow || cap_lints_allow);