graphic design tool
git clone https://git.lucas.co/cce-designer.git
refactor: drop hardcoded /home/lsgalante HOME fallback
Replace env::var("HOME").unwrap_or_else(|_| "/home/lsgalante") with
.unwrap_or_default() — identical when $HOME is set, no hardcoded username.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
src/app.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app.rs b/src/app.rs
index 3d73232..1ef47ca 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -419,7 +419,7 @@ fn hex_to_float_array(hex: &str) -> Option<[f32; 3]> {
impl DesignSettings {
fn file_path() -> std::path::PathBuf {
- let home = std::env::var("HOME").unwrap_or_else(|_| "/home/lsgalante".to_string());
+ let home = std::env::var("HOME").unwrap_or_default();
let mut path = std::path::PathBuf::from(home);
path.push(".config");
path.push("cce");