summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index f63816b..afedb8c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,5 @@
use serde_json::Value;
-use std::{fs, path::Path};
+use std::fs;
const CONFIG_PATH: &str = "/home/adam/.config/forecast";
@@ -38,8 +38,8 @@ fn setup() -> (String, String) {
}
fn read_file(file_name: &str) -> String {
- let path = Path::new(CONFIG_PATH).join(file_name);
- fs::read_to_string(path.to_string_lossy().to_string()).unwrap()
+ let path = CONFIG_PATH.to_owned() + "/" + file_name;
+ fs::read_to_string(path).unwrap()
}
fn request_weather(