mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
build: treewide: fmt for edition 2024
`cargo +nightly fmt` Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Bo Chen
parent
061351d82d
commit
363273111a
@@ -3,14 +3,14 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
use std::panic::AssertUnwindSafe;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::thread;
|
||||
|
||||
use futures::channel::oneshot;
|
||||
use futures::{executor, FutureExt};
|
||||
use futures::{FutureExt, executor};
|
||||
use hypervisor::HypervisorType;
|
||||
use seccompiler::{apply_filter, SeccompAction};
|
||||
use seccompiler::{SeccompAction, apply_filter};
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
use zbus::connection::Builder;
|
||||
use zbus::fdo::{self, Result};
|
||||
@@ -26,7 +26,7 @@ use crate::api::{
|
||||
VmReceiveMigration, VmRemoveDevice, VmResize, VmResizeZone, VmRestore, VmResume,
|
||||
VmSendMigration, VmShutdown, VmSnapshot, VmmPing, VmmShutdown,
|
||||
};
|
||||
use crate::seccomp_filters::{get_seccomp_filter, Thread};
|
||||
use crate::seccomp_filters::{Thread, get_seccomp_filter};
|
||||
use crate::{Error as VmmError, NetConfig, Result as VmmResult, VmConfig};
|
||||
|
||||
pub type DBusApiShutdownChannels = (oneshot::Sender<()>, oneshot::Receiver<()>);
|
||||
|
||||
@@ -11,9 +11,9 @@ use std::sync::mpsc::Sender;
|
||||
use micro_http::{Body, Method, Request, Response, StatusCode, Version};
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
use crate::api::http::{error_response, EndpointHandler, HttpError};
|
||||
#[cfg(all(target_arch = "x86_64", feature = "guest_debug"))]
|
||||
use crate::api::VmCoredump;
|
||||
use crate::api::http::{EndpointHandler, HttpError, error_response};
|
||||
use crate::api::{
|
||||
AddDisk, ApiAction, ApiError, ApiRequest, NetConfig, VmAddDevice, VmAddFs, VmAddNet, VmAddPmem,
|
||||
VmAddUserDevice, VmAddVdpa, VmAddVsock, VmBoot, VmConfig, VmCounters, VmDelete, VmNmi, VmPause,
|
||||
|
||||
@@ -10,15 +10,15 @@ use std::os::unix::io::{IntoRawFd, RawFd};
|
||||
use std::os::unix::net::UnixListener;
|
||||
use std::panic::AssertUnwindSafe;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::LazyLock;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::thread;
|
||||
|
||||
use hypervisor::HypervisorType;
|
||||
use micro_http::{
|
||||
Body, HttpServer, MediaType, Method, Request, Response, ServerError, StatusCode, Version,
|
||||
};
|
||||
use seccompiler::{apply_filter, SeccompAction};
|
||||
use seccompiler::{SeccompAction, apply_filter};
|
||||
use serde_json::Error as SerdeError;
|
||||
use thiserror::Error;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
@@ -33,7 +33,7 @@ use crate::api::{
|
||||
VmSendMigration, VmShutdown, VmSnapshot,
|
||||
};
|
||||
use crate::landlock::Landlock;
|
||||
use crate::seccomp_filters::{get_seccomp_filter, Thread};
|
||||
use crate::seccomp_filters::{Thread, get_seccomp_filter};
|
||||
use crate::{Error as VmmError, Result};
|
||||
|
||||
pub mod http_endpoint;
|
||||
|
||||
@@ -34,7 +34,7 @@ pub mod dbus;
|
||||
pub mod http;
|
||||
|
||||
use std::io;
|
||||
use std::sync::mpsc::{channel, RecvError, SendError, Sender};
|
||||
use std::sync::mpsc::{RecvError, SendError, Sender, channel};
|
||||
|
||||
use micro_http::Body;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -45,6 +45,7 @@ use vmm_sys_util::eventfd::EventFd;
|
||||
#[cfg(feature = "dbus_api")]
|
||||
pub use self::dbus::start_dbus_thread;
|
||||
pub use self::http::{start_http_fd_thread, start_http_path_thread};
|
||||
use crate::Error as VmmError;
|
||||
use crate::config::RestoreConfig;
|
||||
use crate::device_tree::DeviceTree;
|
||||
use crate::vm::{Error as VmError, VmState};
|
||||
@@ -52,7 +53,6 @@ use crate::vm_config::{
|
||||
DeviceConfig, DiskConfig, FsConfig, NetConfig, PmemConfig, UserDeviceConfig, VdpaConfig,
|
||||
VmConfig, VsockConfig,
|
||||
};
|
||||
use crate::Error as VmmError;
|
||||
|
||||
/// API errors are sent back from the VMM API server through the ApiResponse.
|
||||
#[derive(Error, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user