avoid compiler warnings
This commit is contained in:
parent
36898ffce6
commit
1c0472e88f
@ -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<P: AsRef<Path>>(
|
||||
// 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<P: AsRef<Path>>(
|
||||
archive_name: &str,
|
||||
image_size: u64,
|
||||
chunk_size: Option<usize>,
|
||||
verbose: bool,
|
||||
_verbose: bool,
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let path = image_path.as_ref().to_owned();
|
||||
|
@ -880,7 +880,7 @@ fn detect_fs_type(fd: RawFd) -> Result<i64, Error> {
|
||||
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)
|
||||
|
@ -211,7 +211,6 @@ pub fn file_set_contents_full<P: AsRef<Path>>(
|
||||
}
|
||||
}
|
||||
|
||||
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<u64, Error> {
|
||||
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::os::unix::fs::FileTypeExt;
|
||||
|
||||
let file = std::fs::File::open(path)?;
|
||||
|
Loading…
Reference in New Issue
Block a user