clippy
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0 (cc66ad468 2023-10-03)
- cargo 1.73.0 (9c4383fb5 2023-08-26)
- clippy 0.1.73 (cc66ad4 2023-10-03)
Annotations
Check warning on line 165 in crates/mapdiffbot2/src/runner.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/mapdiffbot2/src/runner.rs:164:20
|
164 | .await;
| ____________________^
165 | | return;
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
164 ~ .await;
165 ~ }
|
Check warning on line 79 in crates/icondiffbot2/src/runner.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/icondiffbot2/src/runner.rs:78:20
|
78 | .await;
| ____________________^
79 | | return;
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
78 ~ .await;
79 ~ }
|
Check warning on line 144 in crates/icondiffbot2/src/job_processor.rs
github-actions / clippy
called `map(..).flatten()` on `Iterator`
warning: called `map(..).flatten()` on `Iterator`
--> crates/icondiffbot2/src/job_processor.rs:138:18
|
138 | .map(|(name, vec)| {
| __________________^
139 | | vec.iter()
140 | | .enumerate()
141 | | .map(|(duplication_index, _)| (duplication_index, name.as_str()))
142 | | .collect::<Vec<_>>()
143 | | })
144 | | .flatten()
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
help: try replacing `map` with `flat_map` and remove the `.flatten()`
|
138 ~ .flat_map(|(name, vec)| {
139 + vec.iter()
140 + .enumerate()
141 + .map(|(duplication_index, _)| (duplication_index, name.as_str()))
142 + .collect::<Vec<_>>()
143 + })
|
Check warning on line 131 in crates/icondiffbot2/src/job_processor.rs
github-actions / clippy
called `map(..).flatten()` on `Iterator`
warning: called `map(..).flatten()` on `Iterator`
--> crates/icondiffbot2/src/job_processor.rs:125:18
|
125 | .map(|(name, vec)| {
| __________________^
126 | | vec.iter()
127 | | .enumerate()
128 | | .map(|(duplication_index, _)| (duplication_index, name.as_str()))
129 | | .collect::<Vec<_>>()
130 | | })
131 | | .flatten()
| |__________________________^
|
= 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
help: try replacing `map` with `flat_map` and remove the `.flatten()`
|
125 ~ .flat_map(|(name, vec)| {
126 + vec.iter()
127 + .enumerate()
128 + .map(|(duplication_index, _)| (duplication_index, name.as_str()))
129 + .collect::<Vec<_>>()
130 + })
|
Check warning on line 40 in crates/icondiffbot2/src/job_processor.rs
github-actions / clippy
`.map().collect()` can be replaced with `.try_for_each()`
warning: `.map().collect()` can be replaced with `.try_for_each()`
--> crates/icondiffbot2/src/job_processor.rs:27:5
|
27 | / job.files
28 | | .iter()
29 | | .map(|dmi| {
30 | | (
... |
39 | | })
40 | | .collect::<Result<()>>()?;
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_collect_result_unit
= note: `#[warn(clippy::map_collect_result_unit)]` on by default
help: try
|
27 ~ job.files
28 + .iter()
29 + .map(|dmi| {
30 + (
31 + sha_to_iconfile(&job, &dmi.filename, status_to_sha(&job, &dmi.status)),
32 + dmi,
33 + )
34 + }).try_for_each(|(file, dmi)| -> Result<()> {
35 + let states = render(&job, file?)?;
36 + map.insert(dmi.filename.as_str(), states);
37 + Ok(())
38 ~ })?;
|
Check warning on line 245 in crates/diffbot_lib/src/github/github_api.rs
github-actions / clippy
single-character string constant used as pattern
warning: single-character string constant used as pattern
--> crates/diffbot_lib/src/github/github_api.rs:245:18
|
245 | .replace("\n", "");
| ^^^^ help: try using a `char` instead: `'\n'`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default