hypervisor: Address Rust 1.51.0 clippy issue (upper_case_acroynms)

warning: name `TranslateGVA` contains a capitalized acronym
  --> hypervisor/src/arch/emulator/mod.rs:51:5
   |
51 |     TranslateGVA(#[source] anyhow::Error),
   |     ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `TranslateGva`
   |
   = 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 <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-03-25 17:01:21 +00:00
parent 7d5d9bdcf4
commit 0c27f69f1c
9 changed files with 45 additions and 45 deletions

View File

@@ -530,7 +530,7 @@ impl cpu::Vcpu for MshvVcpu {
let r = self
.fd
.translate_gva(gva, flags)
.map_err(|e| cpu::HypervisorCpuError::TranslateGVA(e.into()))?;
.map_err(|e| cpu::HypervisorCpuError::TranslateVirtualAddress(e.into()))?;
Ok(r)
}
@@ -555,12 +555,12 @@ impl<'a> MshvEmulatorContext<'a> {
let r = self
.vcpu
.translate_gva(gva, flags.into())
.map_err(|e| PlatformError::TranslateGVA(anyhow!(e)))?;
.map_err(|e| PlatformError::TranslateVirtualAddress(anyhow!(e)))?;
let result_code = unsafe { r.1.__bindgen_anon_1.result_code };
match result_code {
hv_translate_gva_result_code_HvTranslateGvaSuccess => Ok(r.0),
_ => Err(PlatformError::TranslateGVA(anyhow!(result_code))),
_ => Err(PlatformError::TranslateVirtualAddress(anyhow!(result_code))),
}
}
}