Skip to content

Run cargo fmt

Run cargo fmt #9

Triggered via push October 4, 2023 17:34
Status Failure
Total duration 3m 44s
Artifacts

ci.yaml

on: push
Fit to window
Zoom out
Zoom in

Annotations

6 errors, 8 warnings, and 1 notice
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: src/main.rs#L47
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> src/main.rs:47:13 | 47 | // the_match.map(|it| { 48 | || required.insert(it.to_string()); 49 | || if version.default.unwrap_or(false) { 50 | || default = Some(it.to_string()); 51 | || } 52 | || }); | ||______________^- help: try: `if let Some(it) = the_match { ... }` | |______________| | | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: src/sdkman/candidate.rs#L59
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> src/sdkman/candidate.rs:59:21 | 59 | / line.split_whitespace() 60 | | .filter(|word| *word != "*" && *word != ">") 61 | | .last() 62 | | .map(|word| versions.push(word.to_string())); | |____________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn = note: `-D clippy::option-map-unit-fn` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::option_map_unit_fn)]` help: try | 59 ~ if let Some(word) = line.split_whitespace() 60 + .filter(|word| *word != "*" && *word != ">") 61 + .last() { versions.push(word.to_string()) } |
this expression can be written more simply using `.retain()`: src/rules/mod.rs#L45
error: this expression can be written more simply using `.retain()` --> src/rules/mod.rs:45:13 | 45 | / matches = matches 46 | | .into_iter() 47 | | .filter(|it| !exclude_pattern.is_match(it)) 48 | | .collect(); | |__________________________^ help: consider calling `.retain()` instead: `matches.retain(|it| !exclude_pattern.is_match(it))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain = note: `-D clippy::manual-retain` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::manual_retain)]`
use of `expect` followed by a function call: src/rules/mod.rs#L44
error: use of `expect` followed by a function call --> src/rules/mod.rs:44:18 | 44 | .expect(format!("Invalid regex for {}: {}", name, exclude.join("|")).as_str()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Invalid regex for {}: {}", name, exclude.join("|")))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
use of `expect` followed by a function call: src/rules/mod.rs#L35
error: use of `expect` followed by a function call --> src/rules/mod.rs:35:14 | 35 | .expect(format!("Invalid regex for {}: {}", name, self.pattern).as_str()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Invalid regex for {}: {}", name, self.pattern))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call = note: `-D clippy::expect-fun-call` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::expect_fun_call)]`
check
Clippy had exited with the 101 exit code
6 tests found
There are 6 tests, see "Raw output" for the full list of tests.
check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, Swatinem/rust-cache@v1, 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/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/