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:
Ruoqing He
2024-09-29 15:22:27 +00:00
committed by Rob Bradford
parent 9013d8b4ca
commit 61e57e1cb1
99 changed files with 358 additions and 513 deletions
+9 -14
View File
@@ -3,24 +3,19 @@
// SPDX-License-Identifier: Apache-2.0
//
use std::{
collections::BTreeMap,
io, result,
sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
},
};
use std::collections::BTreeMap;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use std::{io, result};
use anyhow::anyhow;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use vhost::{
vdpa::{VhostVdpa, VhostVdpaIovaRange},
vhost_kern::VhostKernFeatures,
vhost_kern::{vdpa::VhostKernVdpa, vhost_binding::VHOST_BACKEND_F_SUSPEND},
VhostBackend, VringConfigData,
};
use vhost::vdpa::{VhostVdpa, VhostVdpaIovaRange};
use vhost::vhost_kern::vdpa::VhostKernVdpa;
use vhost::vhost_kern::vhost_binding::VHOST_BACKEND_F_SUSPEND;
use vhost::vhost_kern::VhostKernFeatures;
use vhost::{VhostBackend, VringConfigData};
use virtio_queue::{Descriptor, Queue, QueueT};
use vm_device::dma_mapping::ExternalDmaMapping;
use vm_memory::{GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryAtomic};