diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index f5ae7490..ff1196a0 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -2,7 +2,7 @@ extern crate proxmox_backup; use failure::*; //use std::os::unix::io::AsRawFd; -use chrono::{DateTime, Local, TimeZone}; +use chrono::{Local, TimeZone}; use std::path::{Path, PathBuf}; use std::collections::HashMap; @@ -18,7 +18,7 @@ use proxmox_backup::backup::*; //use proxmox_backup::backup::datastore::*; use serde_json::{json, Value}; -use hyper::Body; +//use hyper::Body; use std::sync::Arc; use regex::Regex; use xdg::BaseDirectories; @@ -127,7 +127,7 @@ fn backup_directory>( // spawn chunker inside a separate task so that it can run parallel tokio::spawn( tx.send_all(chunk_stream.then(|r| Ok(r))) - .map_err(|e| {}).map(|_| ()) + .map_err(|_| {}).map(|_| ()) ); client.upload_stream(archive_name, stream, "dynamic", None).wait()?; @@ -141,7 +141,7 @@ fn backup_image>( archive_name: &str, image_size: u64, chunk_size: Option, - verbose: bool, + _verbose: bool, ) -> Result<(), Error> { let path = image_path.as_ref().to_owned(); diff --git a/src/pxar/encoder.rs b/src/pxar/encoder.rs index c40209cf..9ed4f2c7 100644 --- a/src/pxar/encoder.rs +++ b/src/pxar/encoder.rs @@ -880,7 +880,7 @@ fn detect_fs_type(fd: RawFd) -> Result { use nix::{convert_ioctl_res, request_code_read, ioc}; // /usr/include/linux/fs.h: #define FS_IOC_GETFLAGS _IOR('f', 1, long) -/// read Linux file system attributes (see man chattr) +// read Linux file system attributes (see man chattr) nix::ioctl_read!(read_attr_fd, b'f', 1, usize); // /usr/include/linux/msdos_fs.h: #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) diff --git a/src/tools.rs b/src/tools.rs index 33f56611..d4c97235 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -211,7 +211,6 @@ pub fn file_set_contents_full>( } } - use std::os::unix::io::FromRawFd; let mut file = unsafe { File::from_raw_fd(fd) }; if let Err(err) = file.write_all(data) { @@ -765,7 +764,6 @@ nix::ioctl_read!(blkgetsize64, 0x12, 114, u64); /// Return file or block device size pub fn image_size(path: &Path) -> Result { - use std::os::unix::io::AsRawFd; use std::os::unix::fs::FileTypeExt; let file = std::fs::File::open(path)?;