error: this `match` can be collapsed into the outer `match`
--> src/dcerpc/detect.rs:215:20
|
215 | Some(x) => match x {
| ____________________^
216 | | DCERPC_TYPE_REQUEST | DCERPC_TYPE_RESPONSE => {}
217 | | _ => {
218 | | return 0;
219 | | }
220 | | },
| |_________^
|
help: the outer pattern can be modified to include the inner pattern
--> src/dcerpc/detect.rs:215:14
|
215 | Some(x) => match x {
| ^ replace this binding
216 | DCERPC_TYPE_REQUEST | DCERPC_TYPE_RESPONSE => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_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;
}
};