fix: ui tests for rust 1.84 (#1517) #619
GitHub Actions / clippy
succeeded
Jan 10, 2025 in 0s
clippy
2 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 2 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0 (9fc6b4312 2025-01-07)
- cargo 1.84.0 (66221abde 2024-11-19)
- clippy 0.1.84 (9fc6b43126 2025-01-07)
Annotations
Check warning on line 28 in server/src/transport/http.rs
github-actions / clippy
this `map_or` is redundant
warning: this `map_or` is redundant
--> server/src/transport/http.rs:21:2
|
21 | / content_type.and_then(|val| val.to_str().ok()).map_or(false, |content| {
22 | | content.eq_ignore_ascii_case("application/json")
23 | | || content.eq_ignore_ascii_case("application/json; charset=utf-8")
24 | | || content.eq_ignore_ascii_case("application/json;charset=utf-8")
... |
27 | | || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8")
28 | | })
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
|
21 ~ content_type.and_then(|val| val.to_str().ok()).is_some_and(|content| {
22 ~ content.eq_ignore_ascii_case("application/json")
23 ~ || content.eq_ignore_ascii_case("application/json; charset=utf-8")
24 ~ || content.eq_ignore_ascii_case("application/json;charset=utf-8")
25 ~ || content.eq_ignore_ascii_case("application/json-rpc")
26 ~ || content.eq_ignore_ascii_case("application/json-rpc;charset=utf-8")
27 ~ || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8")
28 ~ })
|
Check warning on line 28 in server/src/transport/http.rs
github-actions / clippy
this `map_or` is redundant
warning: this `map_or` is redundant
--> server/src/transport/http.rs:21:2
|
21 | / content_type.and_then(|val| val.to_str().ok()).map_or(false, |content| {
22 | | content.eq_ignore_ascii_case("application/json")
23 | | || content.eq_ignore_ascii_case("application/json; charset=utf-8")
24 | | || content.eq_ignore_ascii_case("application/json;charset=utf-8")
... |
27 | | || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8")
28 | | })
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
|
21 ~ content_type.and_then(|val| val.to_str().ok()).is_some_and(|content| {
22 ~ content.eq_ignore_ascii_case("application/json")
23 ~ || content.eq_ignore_ascii_case("application/json; charset=utf-8")
24 ~ || content.eq_ignore_ascii_case("application/json;charset=utf-8")
25 ~ || content.eq_ignore_ascii_case("application/json-rpc")
26 ~ || content.eq_ignore_ascii_case("application/json-rpc;charset=utf-8")
27 ~ || content.eq_ignore_ascii_case("application/json-rpc; charset=utf-8")
28 ~ })
|
Loading