Use is_some_and/is_ok_and in less obvious spots
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user