Use Option::is_some_and
and Result::is_ok_and
in the compiler
This commit is contained in:
parent
70db836922
commit
fb0f74a8c9
87 changed files with 148 additions and 158 deletions
|
@ -1378,8 +1378,8 @@ pub fn build_session(
|
|||
.lint_opts
|
||||
.iter()
|
||||
.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);
|
||||
.is_some_and(|&(_, level)| level == lint::Allow);
|
||||
let cap_lints_allow = sopts.lint_cap.is_some_and(|cap| cap == lint::Allow);
|
||||
let can_emit_warnings = !(warnings_allow || cap_lints_allow);
|
||||
|
||||
let sysroot = match &sopts.maybe_sysroot {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue