]> git.ipfire.org Git - thirdparty/suricata.git/commit
rust: fix clippy warning manual_contains 13012/head 13030/head
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 3 Apr 2025 11:43:29 +0000 (13:43 +0200)
committerPhilippe Antoine <pantoine@oisf.net>
Fri, 11 Apr 2025 19:06:50 +0000 (21:06 +0200)
commit858739519d8eab629dad83d61c83e58f4bfcca97
tree2ab7efa6013484c90e1a4558263dc6f80e458fed
parent2826d670d65b078f76eda24f7251095fcbe4baa6
rust: fix clippy warning manual_contains

warning: using `contains()` instead of `iter().any()` is more efficient
   --> src/http2/http2.rs:267:20
    |
267 |                 if block.value.iter().any(|&x| x == b'@') {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `block.value.contains(&b'@')`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
    = note: `#[warn(clippy::manual_contains)]` on by default

(cherry picked from commit 0f3932afb78680c8af167f2089f52e0342431b1f)
rust/src/http2/http2.rs