diff --git a/src/util_env.rs b/src/util_env.rs index 83056a5..4533c76 100644 --- a/src/util_env.rs +++ b/src/util_env.rs @@ -2,5 +2,5 @@ use std::env; pub fn is_env_on(var: &str) -> bool { - env::var(var).map(|v| v.to_lowercase()).map(|v| (v == "true" || v == "yes" || v == "1")).unwrap_or(false) + env::var(var).map(|v| v.to_lowercase()).map(|v| vec!["true", "yes", "1"].iter().any(|x| x == &v)).unwrap_or(false) }