diff options
author | Mustafa Salih <37256744+MustafaSalih1993@users.noreply.github.com> | 2021-02-03 03:43:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 03:43:31 +0300 |
commit | c4cd23f471fe8d6fdac7ddca436b477c16031373 (patch) | |
tree | bb25b89e1f1186d2f06a7b1ad12bbf26c6d23cac /src/utils/time.rs | |
parent | 303808ea191f4c8d047c14a77a1bd322d4dcc081 (diff) | |
parent | 0359a01cc89b1bbcf0bd08799d2c8dfd09f609d0 (diff) |
Merge pull request #44 from MustafaSalih1993/dev
removed some doublicated code
Diffstat (limited to 'src/utils/time.rs')
-rw-r--r-- | src/utils/time.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils/time.rs b/src/utils/time.rs index fcfb691..191d91b 100644 --- a/src/utils/time.rs +++ b/src/utils/time.rs @@ -1,13 +1,16 @@ use crate::config::CONFIG; +use crate::types::ThreadsData; use chrono::prelude::*; -pub fn get_time() -> String { +pub fn get_time() -> ThreadsData { let now = Local::now(); - format!( + let data = format!( " {} {} {}", CONFIG.time.icon, now.format(&CONFIG.time.format), CONFIG.seperator - ) + ); + + ThreadsData::Time(data) } |