Skip to content

Merge pull request #21 from jupyterkat/db-delete #279

Merge pull request #21 from jupyterkat/db-delete

Merge pull request #21 from jupyterkat/db-delete #279

Triggered via push September 21, 2023 22:15
Status Success
Total duration 5m 24s
Artifacts

rust.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

6 warnings
unneeded `return` statement: crates/mapdiffbot2/src/runner.rs#L164
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 ~ } |
unneeded `return` statement: crates/icondiffbot2/src/runner.rs#L78
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 ~ } |
called `map(..).flatten()` on `Iterator`: crates/icondiffbot2/src/job_processor.rs#L138
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 + }) |
called `map(..).flatten()` on `Iterator`: crates/icondiffbot2/src/job_processor.rs#L125
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 + }) |
`.map().collect()` can be replaced with `.try_for_each()`: crates/icondiffbot2/src/job_processor.rs#L27
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 this | 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 ~ })?; |
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/cache@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/