From 4a5939973c8a8d9545c329c778c622acb0592a94 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 25 Mar 2021 17:01:21 +0000 Subject: [PATCH] ch-remote: Address Rust 1.51.0 clippy issue (upper_case_acroynms) warning: name `InvalidCPUCount` contains a capitalized acronym --> src/bin/ch-remote.rs:24:5 | 24 | InvalidCPUCount(std::num::ParseIntError), | ^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `InvalidCpuCount` | = note: `#[warn(clippy::upper_case_acronyms)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms Signed-off-by: Rob Bradford --- src/bin/ch-remote.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/ch-remote.rs b/src/bin/ch-remote.rs index 5603896ce..46e36ecb7 100644 --- a/src/bin/ch-remote.rs +++ b/src/bin/ch-remote.rs @@ -21,7 +21,7 @@ use std::process; enum Error { Connect(std::io::Error), ApiClient(ApiClientError), - InvalidCPUCount(std::num::ParseIntError), + InvalidCpuCount(std::num::ParseIntError), InvalidMemorySize(ByteSizedParseError), InvalidBalloonSize(ByteSizedParseError), AddDeviceConfig(vmm::config::Error), @@ -39,7 +39,7 @@ impl fmt::Display for Error { match self { ApiClient(e) => e.fmt(f), Connect(e) => write!(f, "Error opening HTTP socket: {}", e), - InvalidCPUCount(e) => write!(f, "Error parsing CPU count: {}", e), + InvalidCpuCount(e) => write!(f, "Error parsing CPU count: {}", e), InvalidMemorySize(e) => write!(f, "Error parsing memory size: {:?}", e), InvalidBalloonSize(e) => write!(f, "Error parsing balloon size: {:?}", e), AddDeviceConfig(e) => write!(f, "Error parsing device syntax: {}", e), @@ -60,7 +60,7 @@ fn resize_api_command( balloon: Option<&str>, ) -> Result<(), Error> { let desired_vcpus: Option = if let Some(cpus) = cpus { - Some(cpus.parse().map_err(Error::InvalidCPUCount)?) + Some(cpus.parse().map_err(Error::InvalidCpuCount)?) } else { None };