Skip to content

Commit abf0832

Browse files
committed
Replace option.map(cond) == Some(true) with option.is_some_and(cond)
1 parent 4ae6586 commit abf0832

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/rustc-clif.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn main() {
2727
args.push(codegen_backend_arg);
2828
}
2929
if !passed_args.iter().any(|arg| {
30-
arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true)
30+
arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
3131
}) {
3232
args.push(OsString::from("--sysroot"));
3333
args.push(OsString::from(sysroot.to_str().unwrap()));

scripts/rustdoc-clif.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn main() {
2727
args.push(codegen_backend_arg);
2828
}
2929
if !passed_args.iter().any(|arg| {
30-
arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true)
30+
arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
3131
}) {
3232
args.push(OsString::from("--sysroot"));
3333
args.push(OsString::from(sysroot.to_str().unwrap()));

0 commit comments

Comments
 (0)