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:
@@ -88,9 +88,8 @@ use std::time::{Duration, Instant};
|
||||
use super::super::defs::uapi;
|
||||
use super::super::packet::VsockPacket;
|
||||
use super::super::{Result as VsockResult, VsockChannel, VsockEpollListener, VsockError};
|
||||
use super::defs;
|
||||
use super::txbuf::TxBuf;
|
||||
use super::{ConnState, Error, PendingRx, PendingRxSet, Result};
|
||||
use super::{defs, ConnState, Error, PendingRx, PendingRxSet, Result};
|
||||
|
||||
/// A self-managing connection object, that handles communication between a guest-side AF_VSOCK
|
||||
/// socket and a host-side `Read + Write + AsRawFd` stream.
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
use std::io::Write;
|
||||
use std::num::Wrapping;
|
||||
|
||||
use super::defs;
|
||||
use super::{Error, Result};
|
||||
use super::{defs, Error, Result};
|
||||
|
||||
/// A simple ring-buffer implementation, used by vsock connections to buffer TX (guest -> host)
|
||||
/// data. Memory for this buffer is allocated lazily, since buffering will only be needed when
|
||||
@@ -144,9 +143,7 @@ impl TxBuf {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io::Error as IoError;
|
||||
use std::io::ErrorKind;
|
||||
use std::io::Result as IoResult;
|
||||
use std::io::{Error as IoError, ErrorKind, Result as IoResult};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user