From e81b215696b8941acbe47a449c19f6967133e551 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 17 Jul 2024 12:30:35 +0800 Subject: refactor: config creation prompt aware of env var (#722) --- src/utils/mod.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/utils/mod.rs') diff --git a/src/utils/mod.rs b/src/utils/mod.rs index aa63f3b..340359c 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -36,11 +36,7 @@ pub fn now() -> String { } pub fn get_env_name(key: &str) -> String { - format!( - "{}_{}", - env!("CARGO_CRATE_NAME").to_uppercase(), - key.to_uppercase(), - ) + format!("{}_{key}", env!("CARGO_CRATE_NAME"),).to_ascii_uppercase() } pub fn estimate_token_length(text: &str) -> usize { -- cgit v1.2.3