rust: remove unnecessary nested match

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

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

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

Loading…
Cancel
Save