From 0a97b76c52c1c40b67410a2fde4e0b789ac7ab51 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 14 Jan 2022 13:36:37 +0000 Subject: [PATCH] hypervisor: mshv: Fix beta clippy issue error: this boolean expression can be simplified --> hypervisor/src/mshv/mod.rs:348:25 | 348 | !(unsafe { access_info.__bindgen_anon_1.string_op() } == 1), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unsafe { access_info.__bindgen_anon_1.string_op() } != 1` | = note: `-D clippy::nonminimal-bool` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool error: this boolean expression can be simplified --> hypervisor/src/mshv/mod.rs:352:25 | 352 | !(unsafe { access_info.__bindgen_anon_1.rep_prefix() } == 1), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unsafe { access_info.__bindgen_anon_1.rep_prefix() } != 1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool Signed-off-by: Rob Bradford --- hypervisor/src/mshv/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index fe963f9a6..46df2a9b4 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -345,11 +345,11 @@ impl cpu::Vcpu for MshvVcpu { // SAFETY: access_info is valid, otherwise we won't be here assert!( - !(unsafe { access_info.__bindgen_anon_1.string_op() } == 1), + (unsafe { access_info.__bindgen_anon_1.string_op() } != 1), "String IN/OUT not supported" ); assert!( - !(unsafe { access_info.__bindgen_anon_1.rep_prefix() } == 1), + (unsafe { access_info.__bindgen_anon_1.rep_prefix() } != 1), "Rep IN/OUT not supported" );