From 2fbd97a622f2ced322a3b63e672155759644ad78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Fri, 8 Jul 2022 17:49:58 +0200 Subject: [PATCH] Simplify adding htracker to XDG_DATA_HOME path. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 4ff0d54..ddd1f5a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,7 +74,7 @@ fn main() let mut hmgr = HabitMgr::new(); let data_dir:PathBuf = match env::var("XDG_DATA_HOME") { - Ok(s) => [ s, "htracker".to_string() ].iter().collect(), + Ok(s) => PathBuf::from(s).join("htracker"), Err(_e) => PathBuf::from("./"), };