]> git.ipfire.org Git - thirdparty/suricata.git/commit
rust/dcerpc: fix single_match clippy warning
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 9 Sep 2024 09:09:18 +0000 (11:09 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 17 Sep 2024 20:16:41 +0000 (22:16 +0200)
commitd3927afb70a4c268ed6e77ce0db121590d47fc97
tree5adc7befdc594a848799d453a8d3acacf0837ba0
parentc6aeec10b574700d9a350074d7f38753ba277b19
rust/dcerpc: fix single_match clippy warning

warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
  --> src/dcerpc/log.rs:36:33
   |
36 |               DCERPC_TYPE_BIND => match &state.bind {
   |  _________________________________^
37 | |                 Some(bind) => {
38 | |                     jsb.open_array("interfaces")?;
39 | |                     for uuid in &bind.uuid_list {
...  |
51 | |                 None => {}
52 | |             },
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
   = note: `#[warn(clippy::single_match)]` on by default

(cherry picked from commit 2a984e3b137a54832df8ae7f4f1bf04784f762dc)
rust/src/dcerpc/log.rs