avoid compiler warnings
This commit is contained in:
1 parent
36898ffce6
commit
1c0472e88f
3 files changed
+5
-7
No files matched your search
@@ -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)?;
|
||||
|
||||
Reference in new issue
Block a user