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

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

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

Loading…
Cancel
Save