mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Remove redundant "use" imports
With the nightly toolchain (2024-02-18) cargo check will flag up redundant imports either because they are pulled in by the prelude on earlier match. Remove those redundant imports. Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
@@ -26,6 +26,7 @@ use rate_limiter::group::{RateLimiterGroup, RateLimiterGroupHandle};
|
||||
use rate_limiter::TokenType;
|
||||
use seccompiler::SeccompAction;
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::VecDeque;
|
||||
use std::io;
|
||||
use std::num::Wrapping;
|
||||
@@ -35,7 +36,6 @@ use std::path::PathBuf;
|
||||
use std::result;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Barrier};
|
||||
use std::{collections::HashMap, convert::TryInto};
|
||||
use thiserror::Error;
|
||||
use versionize::{VersionMap, Versionize, VersionizeResult};
|
||||
use versionize_derive::Versionize;
|
||||
|
||||
@@ -16,7 +16,6 @@ extern crate event_monitor;
|
||||
extern crate log;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::TryInto;
|
||||
use std::io;
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ use net_util::{
|
||||
NetQueuePair, OpenTapError, RxVirtio, Tap, TapError, TxVirtio, VirtioNetConfig,
|
||||
};
|
||||
use seccompiler::SeccompAction;
|
||||
use std::collections::HashMap;
|
||||
use std::net::Ipv4Addr;
|
||||
use std::num::Wrapping;
|
||||
use std::ops::Deref;
|
||||
@@ -32,8 +33,6 @@ use std::result;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Barrier};
|
||||
use std::thread;
|
||||
use std::vec::Vec;
|
||||
use std::{collections::HashMap, convert::TryInto};
|
||||
use thiserror::Error;
|
||||
use versionize::{VersionMap, Versionize, VersionizeResult};
|
||||
use versionize_derive::Versionize;
|
||||
|
||||
@@ -8,7 +8,6 @@ use seccompiler::{
|
||||
BpfProgram, Error, SeccompAction, SeccompCmpArgLen as ArgLen, SeccompCmpOp::Eq,
|
||||
SeccompCondition as Cond, SeccompFilter, SeccompRule,
|
||||
};
|
||||
use std::convert::TryInto;
|
||||
|
||||
pub enum Thread {
|
||||
VirtioBalloon,
|
||||
|
||||
@@ -330,8 +330,6 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::GuestMemoryMmap;
|
||||
use crate::{ActivateResult, VirtioInterrupt};
|
||||
use std::sync::Arc;
|
||||
use virtio_queue::Queue;
|
||||
use vm_memory::GuestMemoryAtomic;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ use std::result;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::{Arc, Barrier, Mutex};
|
||||
use std::thread;
|
||||
use std::vec::Vec;
|
||||
use versionize::{VersionMap, Versionize, VersionizeResult};
|
||||
use versionize_derive::Versionize;
|
||||
use vhost::vhost_user::message::{
|
||||
|
||||
@@ -11,7 +11,7 @@ use crate::{
|
||||
VirtioInterrupt, VirtioSharedMemoryList, VIRTIO_F_IOMMU_PLATFORM,
|
||||
};
|
||||
use crate::{GuestMemoryMmap, GuestRegionMmap, MmapRegion};
|
||||
use libc::{self, c_void, off64_t, pread64, pwrite64};
|
||||
use libc::{c_void, off64_t, pread64, pwrite64};
|
||||
use seccompiler::SeccompAction;
|
||||
use std::io;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
|
||||
@@ -16,7 +16,6 @@ use std::result;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::{Arc, Barrier, Mutex};
|
||||
use std::thread;
|
||||
use std::vec::Vec;
|
||||
use versionize::{VersionMap, Versionize, VersionizeResult};
|
||||
use versionize_derive::Versionize;
|
||||
use vhost::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||
|
||||
@@ -15,7 +15,6 @@ use std::sync::atomic::Ordering;
|
||||
use std::sync::Arc;
|
||||
use std::thread::sleep;
|
||||
use std::time::{Duration, Instant};
|
||||
use std::vec::Vec;
|
||||
use vhost::vhost_kern::vhost_binding::{VHOST_F_LOG_ALL, VHOST_VRING_F_LOG};
|
||||
use vhost::vhost_user::message::{
|
||||
VhostUserHeaderFlag, VhostUserInflight, VhostUserProtocolFeatures, VhostUserVirtioFeatures,
|
||||
|
||||
@@ -672,18 +672,13 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use libc::EFD_NONBLOCK;
|
||||
use virtio_queue::QueueOwnedT;
|
||||
|
||||
use std::io::{Error as IoError, ErrorKind, Read, Result as IoResult, Write};
|
||||
use std::os::unix::io::RawFd;
|
||||
use std::time::{Duration, Instant};
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
use super::super::super::defs::uapi;
|
||||
use super::super::super::tests::TestContext;
|
||||
use super::super::defs as csm_defs;
|
||||
use super::*;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std::io::{Error as IoError, Result as IoResult};
|
||||
use virtio_queue::QueueOwnedT;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
const LOCAL_CID: u64 = 2;
|
||||
const PEER_CID: u64 = 3;
|
||||
|
||||
@@ -146,8 +146,8 @@ impl TxBuf {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::io::Error as IoError;
|
||||
use std::io::ErrorKind;
|
||||
use std::io::Result as IoResult;
|
||||
use std::io::{ErrorKind, Write};
|
||||
|
||||
struct TestSink {
|
||||
data: Vec<u8>,
|
||||
|
||||
@@ -530,7 +530,6 @@ mod tests {
|
||||
use super::super::tests::{NoopVirtioInterrupt, TestContext};
|
||||
use super::super::*;
|
||||
use super::*;
|
||||
use crate::vsock::device::{BACKEND_EVENT, EVT_QUEUE_EVENT, RX_QUEUE_EVENT, TX_QUEUE_EVENT};
|
||||
use crate::ActivateError;
|
||||
use libc::EFD_NONBLOCK;
|
||||
|
||||
|
||||
@@ -851,16 +851,12 @@ impl VsockMuxer {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io::{Read, Write};
|
||||
use std::ops::Drop;
|
||||
use std::os::unix::net::{UnixListener, UnixStream};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use virtio_queue::QueueOwnedT;
|
||||
|
||||
use super::super::super::csm::defs as csm_defs;
|
||||
use super::super::super::tests::TestContext as VsockTestContext;
|
||||
use super::*;
|
||||
use std::io::Write;
|
||||
use std::path::{Path, PathBuf};
|
||||
use virtio_queue::QueueOwnedT;
|
||||
|
||||
const PEER_CID: u32 = 3;
|
||||
const PEER_BUF_ALLOC: u32 = 64 * 1024;
|
||||
|
||||
Reference in New Issue
Block a user