]> git.proxmox.com Git - proxmox-backup.git/commitdiff
avoid compiler warnings
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 18 Mar 2019 09:00:58 +0000 (10:00 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 18 Mar 2019 09:00:58 +0000 (10:00 +0100)
src/backup/datastore.rs
src/section_config.rs

index 429da66effa7e48490b5f8fc1b6856565ab0dd9f..3c0222cac8f48c43586a28b9bebba767eee2e297 100644 (file)
@@ -15,7 +15,7 @@ use super::index::*;
 use super::backup_info::*;
 
 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
@@ -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!
index 9f630c9f3517354e6a675843cb5a4cda467a755d..71429d2e2b8077edeeacf20c2e0f0bf36b8e8de9 100644 (file)
@@ -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(),