rust: remove unnecessary nested match

Bug: #4605
pull/6552/head
Modupe Falodun 5 years ago committed by Victor Julien
parent 74c39500c3
commit a87c7e5c08

@ -59,16 +59,8 @@ impl DHCPLogger {
pub fn do_log(&self, tx: &DHCPTransaction) -> bool { pub fn do_log(&self, tx: &DHCPTransaction) -> bool {
if !self.extended { if !self.extended {
match self.get_type(tx) { if let Some(DHCP_TYPE_ACK) = self.get_type(tx){
Some(t) => { return true;
match t {
DHCP_TYPE_ACK => {
return true;
}
_ => {}
}
}
_ => {}
} }
return false; return false;
} }

@ -63,7 +63,6 @@
#![allow(clippy::while_let_loop)] #![allow(clippy::while_let_loop)]
#![allow(clippy::redundant_pattern_matching)] #![allow(clippy::redundant_pattern_matching)]
#![allow(clippy::field_reassign_with_default)] #![allow(clippy::field_reassign_with_default)]
#![allow(clippy::collapsible_match)]
#[macro_use] #[macro_use]
extern crate nom; extern crate nom;

Loading…
Cancel
Save