Skip to content

r e f a c t o r

r e f a c t o r #54

Triggered via push August 3, 2023 11:27
Status Failure
Total duration 5m 24s
Artifacts 2

build.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 4 warnings
this match could be replaced by its body itself: src/model/servertype/mod.rs#L210
error: this match could be replaced by its body itself --> src/model/servertype/mod.rs:210:9 | 210 | / match self { 211 | | //Self::Forge { .. } => StartupMethod::Custom(vec![""]), 212 | | //Self::NeoForge { .. } => StartupMethod::Custom(vec!["@libraries/net/neoforged/forge/1.20.1-47.1.57/win_args.txt"]), 213 | | _ => StartupMethod::Jar(serverjar_name.to_owned()), 214 | | } | |_________^ help: consider using the match body instead: `StartupMethod::Jar(serverjar_name.to_owned())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding = note: `#[deny(clippy::match_single_binding)]` implied by `#[deny(clippy::all)]`
this expression creates a reference which is immediately dereferenced by the compiler: src/model/servertype/mod.rs#L171
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/model/servertype/mod.rs:171:50 | 171 | map_quilt_loader_version(&http_client, &loader) | ^^^^^^^^^^^^ help: change this to: `http_client` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[deny(clippy::needless_borrow)]` implied by `#[deny(clippy::all)]`
useless use of `format!`: src/core/runner.rs#L55
error: useless use of `format!` --> src/core/runner.rs:55:28 | 55 | let prefix = style(format!("[MC]")).bold(); | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[MC]".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[deny(clippy::useless_format)]` implied by `#[deny(clippy::all)]`
this `if` statement can be collapsed: src/core/bootstrap.rs#L33
error: this `if` statement can be collapsed --> src/core/bootstrap.rs:33:9 | 33 | / if self.server.launcher.eula_args { 34 | | if !self.server.jar.supports_eula_args() { 35 | | println!( 36 | | " {}", ... | 41 | | } 42 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if note: the lint level is defined here --> src/main.rs:1:9 | 1 | #![deny(clippy::all)] | ^^^^^^^^^^^ = note: `#[deny(clippy::collapsible_if)]` implied by `#[deny(clippy::all)]` help: collapse nested if block | 33 ~ if self.server.launcher.eula_args && !self.server.jar.supports_eula_args() { 34 + println!( 35 + " {}", 36 + style("=> eula.txt [eula_args unsupported]").dim() 37 + ); 38 + std::fs::File::create(self.output_dir.join("eula.txt"))? 39 + .write_all(b"eula=true\n")?; 40 + } |
clippy
Clippy had exited with the 101 exit code
redundant closure: src/model/serverlauncher.rs#L75
warning: redundant closure --> src/model/serverlauncher.rs:75:26 | 75 | .map(|c| c.to_owned()) | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::borrow::ToOwned::to_owned` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
redundant closure: src/model/serverlauncher.rs#L66
warning: redundant closure --> src/model/serverlauncher.rs:66:26 | 66 | .map(|c| c.to_owned()) | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::borrow::ToOwned::to_owned` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls = note: `#[warn(clippy::redundant_closure_for_method_calls)]` implied by `#[warn(clippy::pedantic)]`
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/core/runner.rs#L118
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> src/core/runner.rs:118:17 | 118 | / match exit_status.code() { 119 | | Some(i) => format!("java exited with code {}", style(i).red()), 120 | | None => format!( 121 | | "java process {} with a signal", 122 | | style("terminated").yellow() 123 | | ), 124 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else note: the lint level is defined here --> src/main.rs:2:9 | 2 | #![warn(clippy::pedantic)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::single_match_else)]` implied by `#[warn(clippy::pedantic)]` help: try this | 118 ~ if let Some(i) = exit_status.code() { format!("java exited with code {}", style(i).red()) } else { format!( 119 + "java process {} with a signal", 120 + style("terminated").yellow() 121 + ) } |
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/

Artifacts

Produced during runtime
Name Size
mcman-ubuntu-latest Expired
6.9 MB
mcman-windows-latest Expired
8.05 MB