rust/clippy: fix lint: redundant_pattern_matching

pull/8251/head
Jason Ish 4 years ago committed by Victor Julien
parent 7c293ff68f
commit c4cf062a6f

@ -35,7 +35,6 @@
#![allow(clippy::match_like_matches_macro)] #![allow(clippy::match_like_matches_macro)]
#![allow(clippy::module_inception)] #![allow(clippy::module_inception)]
#![allow(clippy::new_without_default)] #![allow(clippy::new_without_default)]
#![allow(clippy::redundant_pattern_matching)]
#![allow(clippy::result_unit_err)] #![allow(clippy::result_unit_err)]
#![allow(clippy::type_complexity)] #![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)] #![allow(clippy::upper_case_acronyms)]

@ -167,10 +167,7 @@ impl NFSState {
} else if r.procedure == NFSPROC3_READ { } else if r.procedure == NFSPROC3_READ {
let found = match self.get_file_tx_by_handle(&xidmap.file_handle, Direction::ToClient) { let found = self.get_file_tx_by_handle(&xidmap.file_handle, Direction::ToClient).is_some();
Some(_) => true,
None => false,
};
if !found { if !found {
let tx = self.new_file_tx(&xidmap.file_handle, &xidmap.file_name, Direction::ToClient); let tx = self.new_file_tx(&xidmap.file_handle, &xidmap.file_name, Direction::ToClient);
tx.procedure = NFSPROC3_READ; tx.procedure = NFSPROC3_READ;

Loading…
Cancel
Save