diff options
| author | sigoden <sigoden@gmail.com> | 2024-07-17 12:30:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-17 12:30:35 +0800 |
| commit | e81b215696b8941acbe47a449c19f6967133e551 (patch) | |
| tree | 22f4796a09c41b26426bb132c634c6a89cb7668b /src/utils | |
| parent | 24347a8a6634b18d3a7dbf7afb0df54fb4311826 (diff) | |
| download | aichat-e81b215696b8941acbe47a449c19f6967133e551.tar.gz | |
refactor: config creation prompt aware of env var (#722)
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/mod.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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 { |
