feat: optimize code
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::env;
|
||||
|
||||
use rust_util::{debugging, iff, warning};
|
||||
use rust_util::{debugging, util_env, warning};
|
||||
use rust_util::util_env as rust_util_env;
|
||||
|
||||
use crate::consts;
|
||||
@@ -41,7 +41,7 @@ pub fn get_auto_select_key_ids() -> Option<Vec<String>> {
|
||||
}
|
||||
|
||||
pub fn get_default_compress() -> Option<bool> {
|
||||
iff!(rust_util_env::is_env_off(TINY_ENCRYPT_ENV_DEFAULT_COMPRESS), Some(true), None)
|
||||
env::var(TINY_ENCRYPT_ENV_DEFAULT_COMPRESS).ok().map(|val| util_env::is_on(&val))
|
||||
}
|
||||
|
||||
pub fn get_no_progress() -> bool {
|
||||
|
||||
Reference in New Issue
Block a user