clippy
4 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 4 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.85.0-nightly (c44b3d50f 2024-12-03)
- cargo 1.85.0-nightly (4c39aaff6 2024-11-25)
- clippy 0.1.85 (c44b3d50fe 2024-12-03)
Annotations
Check failure on line 88 in cosmos_core/src/crafting/recipes/basic_fabricator.rs
github-actions / clippy
this `let...else` may be rewritten with the `?` operator
error: this `let...else` may be rewritten with the `?` operator
--> cosmos_core/src/crafting/recipes/basic_fabricator.rs:84:17
|
84 | / let Some(input) = self.inputs.iter().find(|x| match x.item {
85 | | RecipeItem::Item(id) => id == item_id,
86 | | }) else {
87 | | return None;
88 | | };
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `-D clippy::question-mark` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
help: replace it with
|
84 ~ let input = self.inputs.iter().find(|x| match x.item {
85 + RecipeItem::Item(id) => id == item_id,
86 + })?;
|
Check failure on line 77 in cosmos_core/src/crafting/recipes/basic_fabricator.rs
github-actions / clippy
you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
--> cosmos_core/src/crafting/recipes/basic_fabricator.rs:75:13
|
75 | / let id = match input.item {
76 | | RecipeItem::Item(id) => id,
77 | | };
| |______________^ help: try: `let RecipeItem::Item(id) = input.item;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infallible_destructuring_match
= note: `-D clippy::infallible-destructuring-match` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::infallible_destructuring_match)]`
Check failure on line 88 in cosmos_core/src/crafting/recipes/basic_fabricator.rs
github-actions / clippy
this `let...else` may be rewritten with the `?` operator
error: this `let...else` may be rewritten with the `?` operator
--> cosmos_core/src/crafting/recipes/basic_fabricator.rs:84:17
|
84 | / let Some(input) = self.inputs.iter().find(|x| match x.item {
85 | | RecipeItem::Item(id) => id == item_id,
86 | | }) else {
87 | | return None;
88 | | };
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `-D clippy::question-mark` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
help: replace it with
|
84 ~ let input = self.inputs.iter().find(|x| match x.item {
85 + RecipeItem::Item(id) => id == item_id,
86 + })?;
|
Check failure on line 77 in cosmos_core/src/crafting/recipes/basic_fabricator.rs
github-actions / clippy
you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
--> cosmos_core/src/crafting/recipes/basic_fabricator.rs:75:13
|
75 | / let id = match input.item {
76 | | RecipeItem::Item(id) => id,
77 | | };
| |______________^ help: try: `let RecipeItem::Item(id) = input.item;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infallible_destructuring_match
= note: `-D clippy::infallible-destructuring-match` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::infallible_destructuring_match)]`