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

View File

@@ -11,24 +11,19 @@
extern crate test_infra;
use std::collections::HashMap;
use std::fs;
use std::io;
use std::io::BufRead;
use std::io::Read;
use std::io::Seek;
use std::io::Write;
use std::io::{BufRead, Read, Seek, Write};
use std::os::unix::io::AsRawFd;
use std::path::PathBuf;
use std::process::{Child, Command, Stdio};
use std::string::String;
use std::sync::mpsc;
use std::sync::mpsc::Receiver;
use std::sync::Mutex;
use std::thread;
use std::sync::{mpsc, Mutex};
use std::{fs, io, thread};
use net_util::MacAddr;
use test_infra::*;
use vmm_sys_util::{tempdir::TempDir, tempfile::TempFile};
use vmm_sys_util::tempdir::TempDir;
use vmm_sys_util::tempfile::TempFile;
use wait_timeout::ChildExt;
// Constant taken from the VMM crate.
@@ -2347,7 +2342,8 @@ fn make_guest_panic(guest: &Guest) {
}
mod common_parallel {
use std::{fs::OpenOptions, io::SeekFrom};
use std::fs::OpenOptions;
use std::io::SeekFrom;
use crate::*;