about summary refs log tree commit diff
path: root/compiler/rustc_feature/src/lib.rs
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-05-24 14:33:43 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-05-24 14:33:43 +0000
commit307799a711826294bc2b3e562cd87bf1e2ff28b4 (patch)
tree1aa6b91ab277015585998e92e9be35f80331d7a2 /compiler/rustc_feature/src/lib.rs
parentfb0f74a8c9e8b8f488ec5894d5d314caebf4c662 (diff)
downloadrust-307799a711826294bc2b3e562cd87bf1e2ff28b4.tar.gz
rust-307799a711826294bc2b3e562cd87bf1e2ff28b4.zip
Use `is_some_and`/`is_ok_and` in less obvious spots
Diffstat (limited to 'compiler/rustc_feature/src/lib.rs')
-rw-r--r--compiler/rustc_feature/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_feature/src/lib.rs b/compiler/rustc_feature/src/lib.rs
index dba5effdb52..beb6307846d 100644
--- a/compiler/rustc_feature/src/lib.rs
+++ b/compiler/rustc_feature/src/lib.rs
@@ -84,7 +84,7 @@ impl UnstableFeatures {
     pub fn from_environment(krate: Option<&str>) -> Self {
         // `true` if this is a feature-staged build, i.e., on the beta or stable channel.
         let disable_unstable_features =
-            option_env!("CFG_DISABLE_UNSTABLE_FEATURES").map(|s| s != "0").unwrap_or(false);
+            option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_some_and(|s| s != "0");
         // Returns whether `krate` should be counted as unstable
         let is_unstable_crate =
             |var: &str| krate.is_some_and(|name| var.split(',').any(|new_krate| new_krate == name));