rust/clippy: fix lint: nonminimal_bool

pull/8251/head
Jason Ish 3 years ago committed by Victor Julien
parent 53ae0c8a06
commit e8823644ec

@ -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)]

@ -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

Loading…
Cancel
Save