reduce compiler warnings
This commit is contained in:
parent
383e857749
commit
728797d0c1
@ -23,7 +23,7 @@ pub struct ArchiveIndexHeader {
|
||||
|
||||
pub struct ArchiveIndexReader {
|
||||
store: Arc<ChunkStore>,
|
||||
file: File,
|
||||
_file: File,
|
||||
size: usize,
|
||||
filename: PathBuf,
|
||||
index: *const u8,
|
||||
@ -95,7 +95,7 @@ impl ArchiveIndexReader {
|
||||
Ok(Self {
|
||||
store,
|
||||
filename: full_path,
|
||||
file,
|
||||
_file: file,
|
||||
size,
|
||||
index: data,
|
||||
index_entries: index_size/40,
|
||||
|
@ -1,7 +1,7 @@
|
||||
extern crate proxmox_backup;
|
||||
|
||||
use failure::*;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
//use std::os::unix::io::AsRawFd;
|
||||
|
||||
use proxmox_backup::tools;
|
||||
use proxmox_backup::cli::command::*;
|
||||
@ -13,7 +13,7 @@ use proxmox_backup::client::catar_backup_stream::*;
|
||||
//use proxmox_backup::backup::image_index::*;
|
||||
//use proxmox_backup::config::datastore;
|
||||
//use proxmox_backup::catar::encoder::*;
|
||||
use proxmox_backup::backup::datastore::*;
|
||||
//use proxmox_backup::backup::datastore::*;
|
||||
|
||||
use serde_json::{Value};
|
||||
use hyper::Body;
|
||||
@ -71,13 +71,13 @@ fn create_backup(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
|
||||
let store = tools::required_string_param(¶m, "store")?;
|
||||
let target = tools::required_string_param(¶m, "target")?;
|
||||
|
||||
let mut chunk_size = 4*1024*1024;
|
||||
let mut _chunk_size = 4*1024*1024;
|
||||
|
||||
if let Some(size) = param["chunk-size"].as_u64() {
|
||||
static SIZES: [u64; 7] = [64, 128, 256, 512, 1024, 2048, 4096];
|
||||
|
||||
if SIZES.contains(&size) {
|
||||
chunk_size = (size as usize) * 1024;
|
||||
_chunk_size = (size as usize) * 1024;
|
||||
} else {
|
||||
bail!("Got unsupported chunk size '{}'", size);
|
||||
}
|
||||
@ -101,7 +101,7 @@ fn create_backup(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
|
||||
println!("Backup image '{}' to '{}'", filename, store);
|
||||
|
||||
if stat.st_size <= 0 { bail!("got strange file size '{}'", stat.st_size); }
|
||||
let size = stat.st_size as usize;
|
||||
let _size = stat.st_size as usize;
|
||||
|
||||
panic!("implement me");
|
||||
|
||||
|
@ -49,7 +49,7 @@ impl CaTarBackupStream {
|
||||
|
||||
pub fn open(dirname: &str) -> Result<Self, Error> {
|
||||
|
||||
let mut dir = nix::dir::Dir::open(dirname, OFlag::O_DIRECTORY, Mode::empty())?;
|
||||
let dir = nix::dir::Dir::open(dirname, OFlag::O_DIRECTORY, Mode::empty())?;
|
||||
let path = std::path::PathBuf::from(dirname);
|
||||
|
||||
Self::new(dir, path)
|
||||
|
@ -78,7 +78,7 @@ pub fn save_config(config: &SectionConfigData) -> Result<(), Error> {
|
||||
}
|
||||
|
||||
// shell completion helper
|
||||
pub fn complete_datastore_name(arg: &str) -> Vec<String> {
|
||||
pub fn complete_datastore_name(_arg: &str) -> Vec<String> {
|
||||
match config() {
|
||||
Ok(data) => data.sections.iter().map(|(id,_)| id.to_string()).collect(),
|
||||
Err(_) => return vec![],
|
||||
|
Loading…
Reference in New Issue
Block a user