Remove a warning and change get
to try_get
#58
GitHub Actions / clippy
succeeded
Aug 29, 2024 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.80.1 (3f5fd8dd4 2024-08-06)
- cargo 1.80.1 (376290515 2024-07-16)
- clippy 0.1.80 (3f5fd8d 2024-08-06)
Annotations
Check warning on line 27 in src/routes/game_server.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
warning: called `map(..).flatten()` on `Option`
--> src/routes/game_server.rs:26:10
|
26 | .map(|str| str.strip_prefix("Bearer "))
| __________^
27 | | .flatten()
| |__________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|str| str.strip_prefix("Bearer "))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
Check warning on line 12 in src/errors/mod.rs
github-actions / clippy
field `0` is never read
warning: field `0` is never read
--> src/errors/mod.rs:12:19
|
12 | InvalidSha256(usize),
| ------------- ^^^^^
| |
| field in this variant
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
12 | InvalidSha256(()),
| ~~
Loading