From 2e49507453ec5f5ec1052c79ad23d1c77babb67c Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Mon, 17 Dec 2018 13:29:47 +0100 Subject: Add period to the config file --- src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 7280aed..86ab51a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -10,9 +10,17 @@ const CONFIG_NAME: &str = "almanac.toml"; #[derive(Deserialize)] pub struct Config { pub cals: Vec, + pub period: String, } impl Config { + pub fn new() -> Config { + Config { + cals: vec![], + period: "".to_string(), + } + } + pub fn parse() -> Result { let config_path = match dirs::config_dir() { Some(path) => path, -- cgit v1.2.3