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
|
@ -1907,7 +1907,7 @@ fn collect_print_requests(
|
|||
error_format: ErrorOutputType,
|
||||
) -> Vec<PrintRequest> {
|
||||
let mut prints = Vec::<PrintRequest>::new();
|
||||
if cg.target_cpu.as_ref().map_or(false, |s| s == "help") {
|
||||
if cg.target_cpu.as_ref().is_some_and(|s| s == "help") {
|
||||
prints.push(PrintRequest::TargetCPUs);
|
||||
cg.target_cpu = None;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue