From c4cf062a6f35bdfc34f4b6534cbf4dacaf31705d Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 28 Nov 2022 16:43:04 -0600 Subject: [PATCH] rust/clippy: fix lint: redundant_pattern_matching --- rust/src/lib.rs | 1 - rust/src/nfs/nfs3.rs | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 41c811bb89..d3b989c429 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -35,7 +35,6 @@ #![allow(clippy::match_like_matches_macro)] #![allow(clippy::module_inception)] #![allow(clippy::new_without_default)] -#![allow(clippy::redundant_pattern_matching)] #![allow(clippy::result_unit_err)] #![allow(clippy::type_complexity)] #![allow(clippy::upper_case_acronyms)] diff --git a/rust/src/nfs/nfs3.rs b/rust/src/nfs/nfs3.rs index a0044cbe1b..a90cfbb064 100644 --- a/rust/src/nfs/nfs3.rs +++ b/rust/src/nfs/nfs3.rs @@ -167,10 +167,7 @@ impl NFSState { } else if r.procedure == NFSPROC3_READ { - let found = match self.get_file_tx_by_handle(&xidmap.file_handle, Direction::ToClient) { - Some(_) => true, - None => false, - }; + let found = self.get_file_tx_by_handle(&xidmap.file_handle, Direction::ToClient).is_some(); if !found { let tx = self.new_file_tx(&xidmap.file_handle, &xidmap.file_name, Direction::ToClient); tx.procedure = NFSPROC3_READ;