From a729d266c398d0d3a9f43d7df3f351245d1773e3 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 17 Mar 2020 20:44:33 +0100 Subject: [PATCH] smb: fix rustc 1.42 warnings --- rust/src/smb/detect.rs | 8 ++++---- rust/src/smb/smb.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rust/src/smb/detect.rs b/rust/src/smb/detect.rs index c5029d8d0b..58d65c3224 100644 --- a/rust/src/smb/detect.rs +++ b/rust/src/smb/detect.rs @@ -151,16 +151,16 @@ fn match_version(op: u8, them: u16, us: u16) -> bool { true }, 1 => { // LT - (them < us) + them < us }, 2 => { // GT - (them > us) + them > us }, 3 => { // EQ - (them == us) + them == us }, 4 => { // NE - (them != us) + them != us }, _ => { panic!("called with invalid op {}", op); diff --git a/rust/src/smb/smb.rs b/rust/src/smb/smb.rs index 2939108dd5..0200bf0105 100644 --- a/rust/src/smb/smb.rs +++ b/rust/src/smb/smb.rs @@ -705,8 +705,8 @@ impl SMBCommonHdr { // don't include tree id pub fn compare(&self, hdr: &SMBCommonHdr) -> bool { - (self.rec_type == hdr.rec_type && self.ssn_id == hdr.ssn_id && - self.msg_id == hdr.msg_id) + self.rec_type == hdr.rec_type && self.ssn_id == hdr.ssn_id && + self.msg_id == hdr.msg_id } } -- 2.47.2