From e13b2a3db4c76264e33adf8f19688c1b6722472c Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 24 Aug 2025 22:57:45 +0800 Subject: [PATCH] feat: v0.6.50 --- Cargo.toml | 2 +- src/util_env.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7e8d0b0..0adc7ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_util" -version = "0.6.49" +version = "0.6.50" authors = ["Hatter Jiang "] edition = "2018" description = "Hatter's Rust Util" diff --git a/src/util_env.rs b/src/util_env.rs index c90ec36..4809d70 100644 --- a/src/util_env.rs +++ b/src/util_env.rs @@ -1,11 +1,11 @@ use std::env; pub fn is_env_on(var: &str) -> bool { - env::var(var).ok().map(|val| is_on(&val)).unwrap_or(false) + env_var(var).map(|val| is_on(&val)).unwrap_or(false) } pub fn is_env_off(var: &str) -> bool { - env::var(var).ok().map(|val| is_off(&val)).unwrap_or(false) + env_var(var).map(|val| is_off(&val)).unwrap_or(false) } pub fn is_on(val: &str) -> bool {