mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 11:25:20 +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 {
|
assert!(
|
||||||
panic!("String IN/OUT not supported");
|
!(unsafe { access_info.__bindgen_anon_1.string_op() } == 1),
|
||||||
}
|
"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.rep_prefix() } == 1),
|
||||||
|
"Rep IN/OUT not supported"
|
||||||
|
);
|
||||||
|
|
||||||
if is_write {
|
if is_write {
|
||||||
let data = (info.rax as u32).to_le_bytes();
|
let data = (info.rax as u32).to_le_bytes();
|
||||||
|
Loading…
Reference in New Issue
Block a user