avoid compiler warnings

This commit is contained in:
Dietmar Maurer 2019-03-18 10:00:58 +01:00
parent 998b827a5d
commit 515688d1f1
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ use super::index::*;
use super::backup_info::*; use super::backup_info::*;
lazy_static!{ lazy_static!{
static ref datastore_map: Mutex<HashMap<String, Arc<DataStore>>> = Mutex::new(HashMap::new()); static ref DATASTORE_MAP: Mutex<HashMap<String, Arc<DataStore>>> = Mutex::new(HashMap::new());
} }
/// Datastore Management /// Datastore Management
@ -37,7 +37,7 @@ impl DataStore {
let path = store_config["path"].as_str().unwrap(); 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) { if let Some(datastore) = map.get(name) {
// Compare Config - if changed, create new Datastore object! // Compare Config - if changed, create new Datastore object!

View File

@ -252,7 +252,7 @@ impl SectionConfig {
if !first_char.is_whitespace() { return None } 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() { let key = match kv_iter.next() {
Some(v) => v.trim(), Some(v) => v.trim(),