]> git.proxmox.com Git - proxmox-backup.git/commitdiff
avoid compiler warnings
authorDietmar Maurer <dietmar@proxmox.com>
Sun, 16 Dec 2018 12:57:59 +0000 (13:57 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sun, 16 Dec 2018 12:57:59 +0000 (13:57 +0100)
src/api3/config/datastore.rs
src/bin/pbs.rs
src/cli/command.rs
src/config/datastore.rs

index 92d47745ae40d7219cdbcd3497e52da432ef4948..bd93b6ab03cdc620885ab07a5c2fba1e2e28948d 100644 (file)
@@ -5,7 +5,7 @@ use crate::api::schema::*;
 use crate::api::router::*;
 use crate::backup::chunk_store::*;
 use serde_json::{json, Value};
-use std::path::{Path, PathBuf};
+use std::path::PathBuf;
 
 use crate::config::datastore;
 
@@ -15,7 +15,7 @@ pub fn get() -> ApiMethod {
         ObjectSchema::new("Directory index."))
 }
 
-fn get_datastore_list(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
+fn get_datastore_list(_param: Value, _info: &ApiMethod) -> Result<Value, Error> {
 
     let config = datastore::config()?;
 
index 01547eeb1280560e8ea6b7bacde4811e214995c3..e0a1be9d0c59510bc4b51f4d3e5372a5b577acd2 100644 (file)
@@ -1,8 +1,6 @@
 extern crate apitest;
 
-use std::collections::HashMap;
-
-use apitest::api3;
+//use apitest::api3;
 use apitest::cli::command::*;
 
 fn datastore_commands() -> CommandLineInterface {
index b9c426dbc87afa9bc107e5d8c6226b2b83fa0190..b808d16f9bdec60608632a00d494794c58648004 100644 (file)
@@ -4,7 +4,7 @@ use std::collections::HashSet;
 
 use crate::api::schema::*;
 use crate::api::router::*;
-use crate::api::config::*;
+//use crate::api::config::*;
 use crate::getopts;
 
 pub fn print_cli_usage() {
@@ -169,7 +169,7 @@ fn print_simple_completion(
         }
     }
 
-    for (name, (optional, schema)) in &cli_cmd.info.parameters.properties {
+    for (name, (_optional, _schema)) in &cli_cmd.info.parameters.properties {
         if done.contains(*name) { continue; }
         let option = String::from("--") + name;
         if option.starts_with(&prefix) {
@@ -215,15 +215,15 @@ pub fn print_bash_completion(def: &CommandLineInterface) {
         Ok(val) => {
             match usize::from_str_radix(&val, 10) {
                 Ok(i) => i,
-                Err(e) => return,
+                Err(_) => return,
             }
         }
-        Err(e) => return,
+        Err(_) => return,
     };
 
     let cmdline = match std::env::var("COMP_LINE") {
         Ok(val) => val[0..comp_point].to_owned(),
-        Err(e) => return,
+        Err(_) => return,
     };
 
 
index 109ce2e9dbc7c16bdecfaed1731488ab4fb276fb..86a5f325373efc98b44a81e623ea32829c5394dc 100644 (file)
@@ -1,7 +1,7 @@
 use failure::*;
 
 use std::fs::{OpenOptions};
-use std::io::{Read, Write};
+use std::io::Read;
 
 //use std::sync::Arc;
 use crate::tools;