mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Further improve imports styling
By introducing `imports_granularity="Module"` format strategy, effectively groups imports from the same module into one line or block, improving maintainability and readability. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
@@ -10,18 +10,16 @@ use std::net::Ipv4Addr;
|
||||
use std::num::Wrapping;
|
||||
use std::ops::Deref;
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
use std::result;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Barrier};
|
||||
use std::thread;
|
||||
use std::{result, thread};
|
||||
|
||||
use anyhow::anyhow;
|
||||
#[cfg(not(fuzzing))]
|
||||
use net_util::virtio_features_to_tap_offload;
|
||||
use net_util::CtrlQueue;
|
||||
use net_util::{
|
||||
build_net_config_space, build_net_config_space_with_mq, open_tap, MacAddr, NetCounters,
|
||||
NetQueuePair, OpenTapError, RxVirtio, Tap, TapError, TxVirtio, VirtioNetConfig,
|
||||
build_net_config_space, build_net_config_space_with_mq, open_tap, CtrlQueue, MacAddr,
|
||||
NetCounters, NetQueuePair, OpenTapError, RxVirtio, Tap, TapError, TxVirtio, VirtioNetConfig,
|
||||
};
|
||||
use seccompiler::SeccompAction;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -35,16 +33,14 @@ use vm_migration::{Migratable, MigratableError, Pausable, Snapshot, Snapshottabl
|
||||
use vm_virtio::AccessPlatform;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
use super::Error as DeviceError;
|
||||
use super::{
|
||||
ActivateError, ActivateResult, EpollHelper, EpollHelperError, EpollHelperHandler,
|
||||
RateLimiterConfig, VirtioCommon, VirtioDevice, VirtioDeviceType, VirtioInterruptType,
|
||||
EPOLL_HELPER_EVENT_LAST,
|
||||
Error as DeviceError, RateLimiterConfig, VirtioCommon, VirtioDevice, VirtioDeviceType,
|
||||
VirtioInterruptType, EPOLL_HELPER_EVENT_LAST,
|
||||
};
|
||||
use crate::seccomp_filters::Thread;
|
||||
use crate::thread_helper::spawn_virtio_thread;
|
||||
use crate::GuestMemoryMmap;
|
||||
use crate::VirtioInterrupt;
|
||||
use crate::{GuestMemoryMmap, VirtioInterrupt};
|
||||
|
||||
/// Control queue
|
||||
// Event available on the control queue.
|
||||
|
||||
Reference in New Issue
Block a user