aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorRuben Pollan2018-12-17 13:29:47 +0100
committerRuben Pollan2018-12-17 13:29:47 +0100
commit2e49507453ec5f5ec1052c79ad23d1c77babb67c (patch)
tree4ab6ef8ebaa3448573f77a85db187e6542ab62f5 /src/config.rs
parent865395620ed8e8a1c152bd0e4abbfb6890bfdc65 (diff)
Add period to the config file
Diffstat (limited to '')
-rw-r--r--src/config.rs8
1 files changed, 8 insertions, 0 deletions
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<String>,
+ pub period: String,
}
impl Config {
+ pub fn new() -> Config {
+ Config {
+ cals: vec![],
+ period: "".to_string(),
+ }
+ }
+
pub fn parse() -> Result<Config, ConfigError> {
let config_path = match dirs::config_dir() {
Some(path) => path,