1
0
mirror of https://github.com/jht5945/rust_util.git synced 2025-12-27 15:40:03 +08:00

feat: v0.6.50

This commit is contained in:
2025-08-24 22:57:45 +08:00
parent e2b258ca09
commit e13b2a3db4
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rust_util" name = "rust_util"
version = "0.6.49" version = "0.6.50"
authors = ["Hatter Jiang <jht5945@gmail.com>"] authors = ["Hatter Jiang <jht5945@gmail.com>"]
edition = "2018" edition = "2018"
description = "Hatter's Rust Util" description = "Hatter's Rust Util"

View File

@@ -1,11 +1,11 @@
use std::env; use std::env;
pub fn is_env_on(var: &str) -> bool { 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 { 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 { pub fn is_on(val: &str) -> bool {