aboutsummaryrefslogtreecommitdiff
path: root/src/utils/weather.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/weather.rs')
-rw-r--r--src/utils/weather.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils/weather.rs b/src/utils/weather.rs
index 9dc053b..11e446f 100644
--- a/src/utils/weather.rs
+++ b/src/utils/weather.rs
@@ -1,7 +1,8 @@
use crate::config::CONFIG;
+use crate::types::ThreadsData;
// will make a GET request from wttr.in
-pub fn get_weather() -> String {
+pub fn get_weather() -> ThreadsData {
let format = if CONFIG.weather.format.is_empty() {
String::from("%l:+%t")
} else {
@@ -18,5 +19,6 @@ pub fn get_weather() -> String {
Err(_) => err_string,
};
- format!(" {} {} {}", CONFIG.weather.icon, res, CONFIG.seperator)
+ let data = format!(" {} {} {}", CONFIG.weather.icon, res, CONFIG.seperator);
+ ThreadsData::Weather(data)
}