summaryrefslogtreecommitdiffstats
path: root/src/utils/command.rs
diff options
context:
space:
mode:
authormtul0729 <52401682+mtul0729@users.noreply.github.com>2025-03-26 08:34:00 +0800
committerGitHub <noreply@github.com>2025-03-26 08:34:00 +0800
commitdd8f3e4528d45b7602df7ea6380b92a87dc4f711 (patch)
treefaf8368ed6e06a78547959414710848ff19a06ff /src/utils/command.rs
parenta71e7c6be72965afd537aae076e0aee9e6f0755e (diff)
downloadaichat-dd8f3e4528d45b7602df7ea6380b92a87dc4f711.tar.gz
refactor: replace `lazy_static` with `std::sync::LazyLock` (#1246)
Diffstat (limited to 'src/utils/command.rs')
-rw-r--r--src/utils/command.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/command.rs b/src/utils/command.rs
index 300a471..14a40a4 100644
--- a/src/utils/command.rs
+++ b/src/utils/command.rs
@@ -12,10 +12,9 @@ use std::{
use anyhow::{anyhow, bail, Context, Result};
use dirs::home_dir;
+use std::sync::LazyLock;
-lazy_static::lazy_static! {
- pub static ref SHELL: Shell = detect_shell();
-}
+pub static SHELL: LazyLock<Shell> = LazyLock::new(detect_shell);
pub struct Shell {
pub name: String,