Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy 177 v2 #10691

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Clippy 177 v2 #10691

merged 2 commits into from
Mar 21, 2024

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6883

Describe changes:

  • rust: fix clippy 1.77 warning
  • rust: fix some clippy nightly 1.79 warning and other unnecessary to_vec

And get CI green again

#10690 + second commit

Ticket: 6883

error: field `0` is never read
  --> src/asn1/mod.rs:36:14
   |
36 |     BerError(Err<der_parser::error::BerError>),
   |     -------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |
error: unnecessary use of `to_vec`
    --> src/smb/smb.rs:1048:62
     |
1048 |         let (name, is_dcerpc) = match self.guid2name_map.get(&guid.to_vec()) {
     |                                                              ^^^^^^^^^^^^^^ help: replace it with: `guid`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
     = note: `#[deny(clippy::unnecessary_to_owned)]` implied by `#[deny(warnings)]`

And also other uses of to_vec() on already Vec
@victorjulien victorjulien added this to the 8.0 milestone Mar 21, 2024
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 82.66%. Comparing base (bf5cfd6) to head (f7cde8f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10691      +/-   ##
==========================================
- Coverage   82.72%   82.66%   -0.07%     
==========================================
  Files         926      926              
  Lines      247633   247633              
==========================================
- Hits       204865   204714     -151     
- Misses      42768    42919     +151     
Flag Coverage Δ
fuzzcorpus 63.98% <60.00%> (-0.24%) ⬇️
suricata-verify 61.98% <60.00%> (+<0.01%) ⬆️
unittests 62.18% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien victorjulien merged commit f7cde8f into OISF:master Mar 21, 2024
87 checks passed
@victorjulien
Copy link
Member

Merged in #10693, thanks!

This was referenced Mar 21, 2024
This was referenced Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants