refactor: Convert some things from static to const and refactor into drop-consts

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-10-13 08:59:00 +11:00
parent ef9f8caa54
commit f0e46c4a46
22 changed files with 76 additions and 47 deletions

View File

@ -1,15 +1,12 @@
use std::{
ffi::OsStr,
path::PathBuf,
process::{Command, Stdio},
sync::LazyLock,
cell::LazyCell, ffi::OsStr, path::PathBuf, process::{Command, Stdio}
};
use log::info;
pub static COMPAT_INFO: LazyLock<Option<CompatInfo>> = LazyLock::new(create_new_compat_info);
pub const COMPAT_INFO: LazyCell<Option<CompatInfo>> = LazyCell::new(create_new_compat_info);
pub static UMU_LAUNCHER_EXECUTABLE: LazyLock<Option<PathBuf>> = LazyLock::new(|| {
pub const UMU_LAUNCHER_EXECUTABLE: LazyCell<Option<PathBuf>> = LazyCell::new(|| {
let x = get_umu_executable();
info!("{:?}", &x);
x