From 861a986567310dfe9ccd85d2976b0ebfb683c818 Mon Sep 17 00:00:00 2001 From: AdaShoelace Date: Thu, 21 Jan 2021 22:24:15 +0100 Subject: Change to serde Change config serializer to serde in order to get cleaner config types. --- src/utils/time.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/utils/time.rs') diff --git a/src/utils/time.rs b/src/utils/time.rs index 3149ce6..fcfb691 100644 --- a/src/utils/time.rs +++ b/src/utils/time.rs @@ -1,13 +1,13 @@ -use crate::types::Config; +use crate::config::CONFIG; use chrono::prelude::*; -pub fn get_time(config: &Config) -> String { +pub fn get_time() -> String { let now = Local::now(); format!( " {} {} {}", - config.time.icon, - now.format(&config.time.format), - config.seperator + CONFIG.time.icon, + now.format(&CONFIG.time.format), + CONFIG.seperator ) } -- cgit v1.2.3