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 backport7 #10695

Closed
wants to merge 3 commits into from

Commits on Mar 21, 2024

  1. rust: fix clippy 1.77 warning

    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
       |
    
    (cherry picked from commit 02f2fb8)
    catenacyber committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    5a05e02 View commit details
    Browse the repository at this point in the history
  2. rust/smb: fix clippy nightly warning

    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
    
    (cherry picked from commit f7cde8f)
    catenacyber committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    fce01da View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. rust/mqtt: fix clippy 1.77 warning

    rror: creating a mutable reference to mutable static is discouraged
       --> src/mqtt/mqtt.rs:752:23
        |
    752 |     let max_msg_len = &mut MAX_MSG_LEN;
        |                       ^^^^^^^^^^^^^^^^ mutable reference to mutable static
        |
        = note: for more information, see issue #114447 <rust-lang/rust#114447>
        = note: this will be a hard error in the 2024 edition
        = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
    catenacyber committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    4996535 View commit details
    Browse the repository at this point in the history