vmm: Address Rust 1.51.0 clippy issue (upper_case_acroynms)

warning: name `ConvertFromUTF8` contains a capitalized acronym
  --> virtio-devices/src/vsock/unix/mod.rs:32:5
   |
32 |     ConvertFromUTF8(std::str::Utf8Error),
   |     ^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `ConvertFromUtf8`
   |
   = 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:
Rob Bradford 2021-03-25 17:01:21 +00:00
parent 7c9a83f6e1
commit 6837de9057
3 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ unsafe impl ByteValued for VirtioNetConfig {}
#[derive(Debug)]
pub enum Error {
/// Read process MQ.
FailedProcessMQ,
FailedProcessMq,
/// Read queue failed.
GuestMemory(GuestMemoryError),
/// Invalid ctrl class
@ -148,7 +148,7 @@ impl CtrlVirtio {
return Err(Error::InvalidCtlCmd);
}
if let Err(_e) = self.process_mq(&mem, avail_desc) {
return Err(Error::FailedProcessMQ);
return Err(Error::FailedProcessMq);
}
}
_ => return Err(Error::InvalidCtlClass),

View File

@ -29,7 +29,7 @@ mod defs {
#[derive(Debug)]
pub enum Error {
/// Error converting from UTF-8
ConvertFromUTF8(std::str::Utf8Error),
ConvertFromUtf8(std::str::Utf8Error),
/// Error registering a new epoll-listening FD.
EpollAdd(std::io::Error),
/// Error creating an epoll FD.

View File

@ -474,7 +474,7 @@ impl VsockMuxer {
}
let mut word_iter = std::str::from_utf8(&buf[..blen])
.map_err(Error::ConvertFromUTF8)?
.map_err(Error::ConvertFromUtf8)?
.split_whitespace();
word_iter