diff --git a/Cargo.toml b/Cargo.toml index 4091c9e7..7c4cb448 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ exclude = [".clippy.toml", ".githooks/*", ".gitignore", ".github/*", "Makefile"] [dependencies] bitflags = "2.3.3" -nix = "0.26.0" +nix = {version = "0.27.1", features=["fs", "ioctl", "mount"]} env_logger="0.10.0" semver = "1.0.0" serde = "1.0.60" diff --git a/src/testing/loopbacked.rs b/src/testing/loopbacked.rs index 520ae5f0..9bb248b1 100644 --- a/src/testing/loopbacked.rs +++ b/src/testing/loopbacked.rs @@ -5,7 +5,6 @@ use std::{ fs::OpenOptions, io::{self, Seek, SeekFrom, Write}, - os::unix::io::AsRawFd, panic, path::{Path, PathBuf}, }; @@ -100,7 +99,7 @@ fn get_devices(count: u8, dir: &TempDir) -> Vec { .open(&path) .unwrap(); - nix::unistd::ftruncate(f.as_raw_fd(), IEC::Gi as nix::libc::off_t).unwrap(); + nix::unistd::ftruncate(&f, IEC::Gi as nix::libc::off_t).unwrap(); f.sync_all().unwrap(); let ltd = LoopTestDev::new(&lc, &path);