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
path = Some(&block.value);
} else if block.name.eq_ignore_ascii_case(b":authority") {
authority = Some(&block.value);
- if block.value.iter().any(|&x| x == b'@') {
+ if block.value.contains(&b'@') {
// it is forbidden by RFC 9113 to have userinfo in this field
// when in HTTP1 we can have user:password@domain.com
self.set_event(HTTP2Event::UserinfoInUri);