rust: address clippy errors

pull/11571/head
Victor Julien 1 year ago committed by Victor Julien
parent 5bda7b5017
commit a0bf282963

@ -81,13 +81,8 @@ pub fn conf_get(key: &str) -> Option<&str> {
// Return the value of key as a boolean. A value that is not set is
// the same as having it set to false.
pub fn conf_get_bool(key: &str) -> bool {
if let Some(val) = conf_get(key) {
match val {
"1" | "yes" | "true" | "on" => {
return true;
},
_ => {},
}
if let Some("1" | "yes" | "true" | "on") = conf_get(key) {
return true;
}
return false;

@ -504,7 +504,7 @@ impl DCERPCState {
/// description: call_id param derived from TCP Header
/// * `dir`:
/// type: enum Direction
/// description: direction of the flow
/// description: direction of the flow
///
/// Return value:
/// Option mutable reference to DCERPCTransaction

@ -212,13 +212,8 @@ pub extern "C" fn rs_dcerpc_iface_match(
}
match state.get_hdr_type() {
Some(x) => match x {
DCERPC_TYPE_REQUEST | DCERPC_TYPE_RESPONSE => {}
_ => {
return 0;
}
},
None => {
Some(DCERPC_TYPE_REQUEST | DCERPC_TYPE_RESPONSE) => {},
_ => {
return 0;
}
};

Loading…
Cancel
Save