mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: trim qualified paths in io and lib
Import the std modules used in the crate instead of spelling the full paths at every use site. Signed-off-by: Henry Hrvoje Tonkovac <htonkovac@gmail.com> Assisted-by: Claude:Opus-4.8
This commit is contained in:
committed by
Rob Bradford
parent
b51dfec09c
commit
e5f32e986f
@@ -272,6 +272,7 @@ impl UringDataIo {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io;
|
||||
use std::os::fd::AsRawFd;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
@@ -308,18 +309,18 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
data_io.submit_fsync(fd, 7).unwrap_err().kind(),
|
||||
std::io::ErrorKind::AlreadyExists
|
||||
io::ErrorKind::AlreadyExists
|
||||
);
|
||||
assert_eq!(
|
||||
data_io.submit_nop(7).unwrap_err().kind(),
|
||||
std::io::ErrorKind::AlreadyExists
|
||||
io::ErrorKind::AlreadyExists
|
||||
);
|
||||
assert_eq!(
|
||||
data_io
|
||||
.submit_fallocate(fd, 0, 512, 0, 7)
|
||||
.unwrap_err()
|
||||
.kind(),
|
||||
std::io::ErrorKind::AlreadyExists
|
||||
io::ErrorKind::AlreadyExists
|
||||
);
|
||||
|
||||
let completion = wait_for_completion(&mut data_io);
|
||||
|
||||
Reference in New Issue
Block a user