From e8823644ecc8c7f900426729180b575e7dff9795 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 28 Nov 2022 16:33:38 -0600 Subject: [PATCH] rust/clippy: fix lint: nonminimal_bool --- rust/src/lib.rs | 1 - rust/src/smb/smb2.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rust/src/lib.rs b/rust/src/lib.rs index ba68d009cf..53b078dd5a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -36,7 +36,6 @@ #![allow(clippy::module_inception)] #![allow(clippy::never_loop)] #![allow(clippy::new_without_default)] -#![allow(clippy::nonminimal_bool)] #![allow(clippy::redundant_pattern_matching)] #![allow(clippy::result_unit_err)] #![allow(clippy::type_complexity)] diff --git a/rust/src/smb/smb2.rs b/rust/src/smb/smb2.rs index ac02201cf6..0c1daba6d7 100644 --- a/rust/src/smb/smb2.rs +++ b/rust/src/smb/smb2.rs @@ -188,7 +188,7 @@ pub fn smb2_read_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>) Some(n) => (n.name.to_vec(), n.is_pipe), _ => { (Vec::new(), false) }, }; - let mut is_dcerpc = if is_pipe || (share_name.is_empty() && !is_pipe) { + let mut is_dcerpc = if is_pipe || share_name.is_empty() { state.get_service_for_guid(&file_guid).1 } else { false @@ -327,7 +327,7 @@ pub fn smb2_write_request_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>) Some(n) => { (n.name.to_vec(), n.is_pipe) }, _ => { (Vec::new(), false) }, }; - let mut is_dcerpc = if is_pipe || (share_name.is_empty() && !is_pipe) { + let mut is_dcerpc = if is_pipe || share_name.is_empty() { state.get_service_for_guid(wr.guid).1 } else { false