]> git.ipfire.org Git - thirdparty/suricata.git/commit
rust/mqtt: fix clippy 1.77 warning 10721/head 10724/head
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 21 Mar 2024 21:45:41 +0000 (22:45 +0100)
committerPhilippe Antoine <pantoine@oisf.net>
Mon, 25 Mar 2024 20:02:21 +0000 (21:02 +0100)
commit80d2c6e0a1a10b7378534a265e11127280f19af1
tree38aa82ff42bc10365a427f7932b6e3c25b6e1977
parentfce01dad7766a289f3f010f6bfc2f7fe9a937706
rust/mqtt: fix clippy 1.77 warning

error: 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 <https://github.com/rust-lang/rust/issues/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
rust/src/mqtt/mqtt.rs