mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-07 04:07:21 +00:00
hypervisor: mshv: Use assert!() rather than if+panic
As identified by the new beta clippy. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
1311a7f178
commit
2f57d1c3f9
@ -342,12 +342,14 @@ impl cpu::Vcpu for MshvVcpu {
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if unsafe { access_info.__bindgen_anon_1.string_op() } == 1 {
|
||||
panic!("String IN/OUT not supported");
|
||||
}
|
||||
if unsafe { access_info.__bindgen_anon_1.rep_prefix() } == 1 {
|
||||
panic!("Rep IN/OUT not supported");
|
||||
}
|
||||
assert!(
|
||||
!(unsafe { access_info.__bindgen_anon_1.string_op() } == 1),
|
||||
"String IN/OUT not supported"
|
||||
);
|
||||
assert!(
|
||||
!(unsafe { access_info.__bindgen_anon_1.rep_prefix() } == 1),
|
||||
"Rep IN/OUT not supported"
|
||||
);
|
||||
|
||||
if is_write {
|
||||
let data = (info.rax as u32).to_le_bytes();
|
||||
|
Loading…
x
Reference in New Issue
Block a user