refactor: replace home dependency with std::env::home_dir

This commit is contained in:
GideonBear
2025-11-15 14:37:32 +01:00
parent 8840a273b4
commit b2b51bc8d2
4 changed files with 5 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
#![allow(clippy::cognitive_complexity)]
use std::env;
use std::env::home_dir;
use std::io;
use std::path::PathBuf;
use std::process::exit;
@@ -48,7 +49,7 @@ mod sudo;
mod terminal;
mod utils;
pub(crate) static HOME_DIR: LazyLock<PathBuf> = LazyLock::new(|| home::home_dir().expect("No home directory"));
pub(crate) static HOME_DIR: LazyLock<PathBuf> = LazyLock::new(|| home_dir().expect("No home directory"));
#[cfg(unix)]
pub(crate) static XDG_DIRS: LazyLock<Xdg> = LazyLock::new(|| Xdg::new().expect("No home directory"));