mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 07:30:05 +08:00
feat: v0.6.50
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user