// 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;
/// 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
}
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;
}
};