From 307799a711826294bc2b3e562cd87bf1e2ff28b4 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Wed, 24 May 2023 14:33:43 +0000 Subject: Use `is_some_and`/`is_ok_and` in less obvious spots --- compiler/rustc_feature/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_feature/src') 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)); -- cgit 1.4.1-3-g733a5