Vanilla behavior #730
GitHub Actions / clippy
failed
Mar 18, 2024 in 0s
clippy
4 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 4 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.76.0 (07dca489a 2024-02-04)
- cargo 1.76.0 (c84b36747 2024-01-18)
- clippy 0.1.76 (07dca48 2024-02-04)
Annotations
Check failure on line 345 in src/inventory/mod.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
error: called `map(..).flatten()` on `Option`
--> src/inventory/mod.rs:344:30
|
344 | ... .map(|slot| inv.read().get_item(slot))
| ________________________^
345 | | ... .flatten()
| |________________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|slot| inv.read().get_item(slot))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
Check failure on line 347 in src/inventory/mod.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
error: called `map(..).flatten()` on `Option`
--> src/inventory/mod.rs:341:22
|
341 | .map(|inv| {
| ______________________^
342 | | inv.read()
343 | | .get_slot(*x, *y)
344 | | .map(|slot| inv.read().get_item(slot))
345 | | .flatten()
346 | | })
347 | | .flatten()
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `-D clippy::map-flatten` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::map_flatten)]`
help: try replacing `map` with `and_then` and remove the `.flatten()`
|
341 ~ .and_then(|inv| {
342 + inv.read()
343 + .get_slot(*x, *y)
344 + .map(|slot| inv.read().get_item(slot))
345 + .flatten()
346 + })
|
Check failure on line 345 in src/inventory/mod.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
error: called `map(..).flatten()` on `Option`
--> src/inventory/mod.rs:344:30
|
344 | ... .map(|slot| inv.read().get_item(slot))
| ________________________^
345 | | ... .flatten()
| |________________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|slot| inv.read().get_item(slot))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
Check failure on line 347 in src/inventory/mod.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
error: called `map(..).flatten()` on `Option`
--> src/inventory/mod.rs:341:22
|
341 | .map(|inv| {
| ______________________^
342 | | inv.read()
343 | | .get_slot(*x, *y)
344 | | .map(|slot| inv.read().get_item(slot))
345 | | .flatten()
346 | | })
347 | | .flatten()
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `-D clippy::map-flatten` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::map_flatten)]`
help: try replacing `map` with `and_then` and remove the `.flatten()`
|
341 ~ .and_then(|inv| {
342 + inv.read()
343 + .get_slot(*x, *y)
344 + .map(|slot| inv.read().get_item(slot))
345 + .flatten()
346 + })
|
Loading