diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index 429da66e..3c0222ca 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -15,7 +15,7 @@ use super::index::*; use super::backup_info::*; lazy_static!{ - static ref datastore_map: Mutex>> = Mutex::new(HashMap::new()); + static ref DATASTORE_MAP: Mutex>> = Mutex::new(HashMap::new()); } /// Datastore Management @@ -37,7 +37,7 @@ impl DataStore { let path = store_config["path"].as_str().unwrap(); - let mut map = datastore_map.lock().unwrap(); + let mut map = DATASTORE_MAP.lock().unwrap(); if let Some(datastore) = map.get(name) { // Compare Config - if changed, create new Datastore object! diff --git a/src/section_config.rs b/src/section_config.rs index 9f630c9f..71429d2e 100644 --- a/src/section_config.rs +++ b/src/section_config.rs @@ -252,7 +252,7 @@ impl SectionConfig { if !first_char.is_whitespace() { return None } - let mut kv_iter = line.trim_left().splitn(2, |c: char| c.is_whitespace()); + let mut kv_iter = line.trim_start().splitn(2, |c: char| c.is_whitespace()); let key = match kv_iter.next() { Some(v) => v.trim(),