about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2023-11-24 08:49:37 -0800
committerDavid Tolnay <dtolnay@gmail.com>2023-11-24 09:14:09 -0800
commitabf08329bbcc0a3d7c91c3e5c98c458c77a968cc (patch)
treeffc4911fbed84040f19e41adbb775783b99fa54e
parent4ae658683f87b0f34ffb5c06f50ca1c51333a1a4 (diff)
downloadrust-abf08329bbcc0a3d7c91c3e5c98c458c77a968cc.tar.gz
rust-abf08329bbcc0a3d7c91c3e5c98c458c77a968cc.zip
Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`
-rw-r--r--scripts/rustc-clif.rs2
-rw-r--r--scripts/rustdoc-clif.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/rustc-clif.rs b/scripts/rustc-clif.rs
index 33d51bdddea..550f2051553 100644
--- a/scripts/rustc-clif.rs
+++ b/scripts/rustc-clif.rs
@@ -27,7 +27,7 @@ fn main() {
         args.push(codegen_backend_arg);
     }
     if !passed_args.iter().any(|arg| {
-        arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true)
+        arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
     }) {
         args.push(OsString::from("--sysroot"));
         args.push(OsString::from(sysroot.to_str().unwrap()));
diff --git a/scripts/rustdoc-clif.rs b/scripts/rustdoc-clif.rs
index 10582cc7bb3..f7d1bdbc4c6 100644
--- a/scripts/rustdoc-clif.rs
+++ b/scripts/rustdoc-clif.rs
@@ -27,7 +27,7 @@ fn main() {
         args.push(codegen_backend_arg);
     }
     if !passed_args.iter().any(|arg| {
-        arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true)
+        arg == "--sysroot" || arg.to_str().is_some_and(|s| s.starts_with("--sysroot="))
     }) {
         args.push(OsString::from("--sysroot"));
         args.push(OsString::from(sysroot.to_str().unwrap()));