mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
main: Address Rust 1.51.0 clippy issue (upper_case_acroynms)
warning: name `StartVMMThread` contains a capitalized acronym --> src/main.rs:50:5 | 50 | StartVMMThread(#[source] vmm::Error), | ^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `StartVmmThread` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
4a5939973c
commit
19c5e91b6e
@ -36,7 +36,7 @@ use vmm_sys_util::eventfd::EventFd;
|
|||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
enum Error {
|
enum Error {
|
||||||
#[error("Failed to create API EventFd: {0}")]
|
#[error("Failed to create API EventFd: {0}")]
|
||||||
CreateAPIEventFd(#[source] std::io::Error),
|
CreateApiEventFd(#[source] std::io::Error),
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "kvm",
|
feature = "kvm",
|
||||||
error("Failed to open hypervisor interface (is /dev/kvm available?): {0}")
|
error("Failed to open hypervisor interface (is /dev/kvm available?): {0}")
|
||||||
@ -47,7 +47,7 @@ enum Error {
|
|||||||
)]
|
)]
|
||||||
CreateHypervisor(#[source] hypervisor::HypervisorError),
|
CreateHypervisor(#[source] hypervisor::HypervisorError),
|
||||||
#[error("Failed to start the VMM thread: {0}")]
|
#[error("Failed to start the VMM thread: {0}")]
|
||||||
StartVMMThread(#[source] vmm::Error),
|
StartVmmThread(#[source] vmm::Error),
|
||||||
#[error("Error parsing config: {0}")]
|
#[error("Error parsing config: {0}")]
|
||||||
ParsingConfig(vmm::config::Error),
|
ParsingConfig(vmm::config::Error),
|
||||||
#[error("Error creating VM: {0:?}")]
|
#[error("Error creating VM: {0:?}")]
|
||||||
@ -371,7 +371,7 @@ fn create_app<'a, 'b>(
|
|||||||
|
|
||||||
fn start_vmm(cmd_arguments: ArgMatches, api_socket_path: &Option<String>) -> Result<(), Error> {
|
fn start_vmm(cmd_arguments: ArgMatches, api_socket_path: &Option<String>) -> Result<(), Error> {
|
||||||
let (api_request_sender, api_request_receiver) = channel();
|
let (api_request_sender, api_request_receiver) = channel();
|
||||||
let api_evt = EventFd::new(EFD_NONBLOCK).map_err(Error::CreateAPIEventFd)?;
|
let api_evt = EventFd::new(EFD_NONBLOCK).map_err(Error::CreateApiEventFd)?;
|
||||||
|
|
||||||
let http_sender = api_request_sender.clone();
|
let http_sender = api_request_sender.clone();
|
||||||
let seccomp_action = if let Some(seccomp_value) = cmd_arguments.value_of("seccomp") {
|
let seccomp_action = if let Some(seccomp_value) = cmd_arguments.value_of("seccomp") {
|
||||||
@ -424,7 +424,7 @@ fn start_vmm(cmd_arguments: ArgMatches, api_socket_path: &Option<String>) -> Res
|
|||||||
&seccomp_action,
|
&seccomp_action,
|
||||||
hypervisor,
|
hypervisor,
|
||||||
)
|
)
|
||||||
.map_err(Error::StartVMMThread)?;
|
.map_err(Error::StartVmmThread)?;
|
||||||
|
|
||||||
// Can't test for "vm-config" group as some have default values. The kernel
|
// Can't test for "vm-config" group as some have default values. The kernel
|
||||||
// is the only required option for booting the VM.
|
// is the only required option for booting the VM.
|
||||||
|
Loading…
Reference in New Issue
Block a user