diff --git a/rust/src/conf.rs b/rust/src/conf.rs index 50acf6cae8..0d28f4d8b4 100644 --- a/rust/src/conf.rs +++ b/rust/src/conf.rs @@ -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; diff --git a/rust/src/dcerpc/dcerpc.rs b/rust/src/dcerpc/dcerpc.rs index bb82ad33be..9ac3b6ba2c 100644 --- a/rust/src/dcerpc/dcerpc.rs +++ b/rust/src/dcerpc/dcerpc.rs @@ -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 diff --git a/rust/src/dcerpc/detect.rs b/rust/src/dcerpc/detect.rs index 81f2854ace..b513bee2cf 100644 --- a/rust/src/dcerpc/detect.rs +++ b/rust/src/dcerpc/detect.rs @@ -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; } };