fix: parsing derive block #150
GitHub Actions / clippy
failed
Sep 2, 2024 in 0s
clippy
2 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
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 75 in src/strategies/rust_derive.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
error: called `map(..).flatten()` on `Option`
--> src/strategies/rust_derive.rs:71:10
|
71 | .map(|start| {
| __________^
72 | | let end = line_without_comment[start..].find(")]")?;
73 | | Some(start + 9..start + end)
74 | | })
75 | | .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()`
|
71 ~ .and_then(|start| {
72 + let end = line_without_comment[start..].find(")]")?;
73 + Some(start + 9..start + end)
74 + })
|
Check failure on line 75 in src/strategies/rust_derive.rs
github-actions / clippy
called `map(..).flatten()` on `Option`
error: called `map(..).flatten()` on `Option`
--> src/strategies/rust_derive.rs:71:10
|
71 | .map(|start| {
| __________^
72 | | let end = line_without_comment[start..].find(")]")?;
73 | | Some(start + 9..start + end)
74 | | })
75 | | .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()`
|
71 ~ .and_then(|start| {
72 + let end = line_without_comment[start..].find(")]")?;
73 + Some(start + 9..start + end)
74 + })
|
Loading