From dd8f3e4528d45b7602df7ea6380b92a87dc4f711 Mon Sep 17 00:00:00 2001 From: mtul0729 <52401682+mtul0729@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:34:00 +0800 Subject: refactor: replace `lazy_static` with `std::sync::LazyLock` (#1246) --- src/utils/command.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/utils/command.rs') 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 = LazyLock::new(detect_shell); pub struct Shell { pub name: String, -- cgit v1.2.3