Commit 805ac10
committed
rust/smb: fix manual_unwrap_or_default
warning: match can be simplified with `.unwrap_or_default()`
--> src/smb/smb2.rs:682:41
|
682 | let _guid_vec = match state.ssn2vec_map.remove(&guid_key) {
| _________________________________________^
683 | | Some(p) => p,
684 | | None => {
685 | | SCLogDebug!("SMBv2 response: GUID NOT FOUND");
686 | | Vec::new()
687 | | },
688 | | };
| |_________________________^ help: replace it with: `state.ssn2vec_map.remove(&guid_key).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default1 parent 8d45e8c commit 805ac10
1 file changed
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
| 682 | + | |
689 | 683 | | |
690 | 684 | | |
691 | 685 | | |
| |||
0 commit comments