Skip to content

Merge pull request #70 from MrNavaStar/patch-1 #120

Merge pull request #70 from MrNavaStar/patch-1

Merge pull request #70 from MrNavaStar/patch-1 #120

Triggered via push August 10, 2024 06:01
Status Success
Total duration 4m 51s
Artifacts

publish.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

18 errors and 23 warnings
direct implementation of `ToString`: src/util/mod.rs#L12
error: direct implementation of `ToString` --> src/util/mod.rs:12:1 | 12 | / impl<T> ToString for SelectItem<T> { 13 | | fn to_string(&self) -> String { 14 | | match &self.1 { 15 | | Cow::Borrowed(s) => (*s).to_string(), ... | 18 | | } 19 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/model/servertype/mod.rs#L141
error: direct implementation of `ToString` --> src/model/servertype/mod.rs:141:1 | 141 | / impl ToString for ServerType { 142 | | fn to_string(&self) -> String { 143 | | match self { 144 | | ServerType::Vanilla {} => String::from("Vanilla"), ... | 158 | | } 159 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/model/downloadable/markdown.rs#L138
error: direct implementation of `ToString` --> src/model/downloadable/markdown.rs:138:1 | 138 | / impl ToString for Downloadable { 139 | | fn to_string(&self) -> String { 140 | | self.to_short_string() 141 | | } 142 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `-D clippy::to-string-trait-impl` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::to_string_trait_impl)]`
file opened with `create`, but `truncate` behavior not defined: src/core/scripts.rs#L57
error: file opened with `create`, but `truncate` behavior not defined --> src/core/scripts.rs:57:18 | 57 | .create(true) | ^^^^^^^^^^^^- help: add: `.truncate(true)` | = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` = help: alternatively, use `.append(true)` to append to the file instead of overwriting it = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options = note: `-D clippy::suspicious-open-options` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::suspicious_open_options)]`
the borrowed expression implements the required traits: src/app/hashing.rs#L94
error: the borrowed expression implements the required traits --> src/app/hashing.rs:94:24 | 94 | Ok(hex::encode(&digester.finalize())) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `digester.finalize()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/app/hashing.rs#L74
error: the borrowed expression implements the required traits --> src/app/hashing.rs:74:43 | 74 | let stream_hash = hex::encode(&digester.finalize()); | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `digester.finalize()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/app/downloading.rs#L104
error: the borrowed expression implements the required traits --> src/app/downloading.rs:104:47 | 104 | let stream_hash = hex::encode(&digest.finalize()); | ^^^^^^^^^^^^^^^^^^ help: change this to: `digest.finalize()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `-D clippy::needless-borrows-for-generic-args` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`
lint group `pedantic` has the same priority (0) as a lint: Cargo.toml#L24
error: lint group `pedantic` has the same priority (0) as a lint --> Cargo.toml:24:1 | 24 | pedantic = "warn" | ^^^^^^^^ ------ has an implicit priority of 0 25 | missing_docs_in_private_items = "allow" | ----------------------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority help: to have lints override the group set `pedantic` to a lower priority | 24 | pedantic = { level = "warn", priority = -1 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lint group `all` has the same priority (0) as a lint: Cargo.toml#L23
error: lint group `all` has the same priority (0) as a lint --> Cargo.toml:23:1 | 23 | all = "deny" | ^^^ ------ has an implicit priority of 0 24 | pedantic = "warn" 25 | missing_docs_in_private_items = "allow" | ----------------------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority = note: `-D clippy::lint-groups-priority` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::lint_groups_priority)]` help: to have lints override the group set `all` to a lower priority | 23 | all = { level = "deny", priority = -1 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
direct implementation of `ToString`: src/util/mod.rs#L12
error: direct implementation of `ToString` --> src/util/mod.rs:12:1 | 12 | / impl<T> ToString for SelectItem<T> { 13 | | fn to_string(&self) -> String { 14 | | match &self.1 { 15 | | Cow::Borrowed(s) => (*s).to_string(), ... | 18 | | } 19 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/model/servertype/mod.rs#L141
error: direct implementation of `ToString` --> src/model/servertype/mod.rs:141:1 | 141 | / impl ToString for ServerType { 142 | | fn to_string(&self) -> String { 143 | | match self { 144 | | ServerType::Vanilla {} => String::from("Vanilla"), ... | 158 | | } 159 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/model/downloadable/markdown.rs#L138
error: direct implementation of `ToString` --> src/model/downloadable/markdown.rs:138:1 | 138 | / impl ToString for Downloadable { 139 | | fn to_string(&self) -> String { 140 | | self.to_short_string() 141 | | } 142 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `-D clippy::to-string-trait-impl` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::to_string_trait_impl)]`
file opened with `create`, but `truncate` behavior not defined: src/core/scripts.rs#L57
error: file opened with `create`, but `truncate` behavior not defined --> src/core/scripts.rs:57:18 | 57 | .create(true) | ^^^^^^^^^^^^- help: add: `.truncate(true)` | = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` = help: alternatively, use `.append(true)` to append to the file instead of overwriting it = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options = note: `-D clippy::suspicious-open-options` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::suspicious_open_options)]`
the borrowed expression implements the required traits: src/app/hashing.rs#L94
error: the borrowed expression implements the required traits --> src/app/hashing.rs:94:24 | 94 | Ok(hex::encode(&digester.finalize())) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `digester.finalize()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/app/hashing.rs#L74
error: the borrowed expression implements the required traits --> src/app/hashing.rs:74:43 | 74 | let stream_hash = hex::encode(&digester.finalize()); | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `digester.finalize()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/app/downloading.rs#L104
error: the borrowed expression implements the required traits --> src/app/downloading.rs:104:47 | 104 | let stream_hash = hex::encode(&digest.finalize()); | ^^^^^^^^^^^^^^^^^^ help: change this to: `digest.finalize()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `-D clippy::needless-borrows-for-generic-args` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`
lint group `pedantic` has the same priority (0) as a lint: Cargo.toml#L24
error: lint group `pedantic` has the same priority (0) as a lint --> Cargo.toml:24:1 | 24 | pedantic = "warn" | ^^^^^^^^ ------ has an implicit priority of 0 ... 28 | struct_excessive_bools = "allow" | ---------------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority help: to have lints override the group set `pedantic` to a lower priority | 24 | pedantic = { level = "warn", priority = -1 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lint group `all` has the same priority (0) as a lint: Cargo.toml#L23
error: lint group `all` has the same priority (0) as a lint --> Cargo.toml:23:1 | 23 | all = "deny" | ^^^ ------ has an implicit priority of 0 ... 28 | struct_excessive_bools = "allow" | ---------------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority = note: `-D clippy::lint-groups-priority` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::lint_groups_priority)]` help: to have lints override the group set `all` to a lower priority | 23 | all = { level = "deny", priority = -1 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
called `map(<f>).unwrap_or_default()` on a `Result` value: src/main.rs#L81
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/main.rs:81:10 | 81 | .map(|s| s.as_str() == "true") | __________^ 82 | | .unwrap_or_default() | |____________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
assigning the result of `Clone::clone()` may be inefficient: src/model/servertoml.rs#L152
warning: assigning the result of `Clone::clone()` may be inefficient --> src/model/servertoml.rs:152:13 | 152 | self.mc_version = v.clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.mc_version.clone_from(v)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
assigning the result of `ToOwned::to_owned()` may be inefficient: src/model/lockfile.rs#L52
warning: assigning the result of `ToOwned::to_owned()` may be inefficient --> src/model/lockfile.rs:52:9 | 52 | nw.path = path.to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `path.clone_into(&mut nw.path)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
assigning the result of `ToOwned::to_owned()` may be inefficient: src/hot_reload/config.rs#L78
warning: assigning the result of `ToOwned::to_owned()` may be inefficient --> src/hot_reload/config.rs:78:9 | 78 | h.path = path.to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `path.clone_into(&mut h.path)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
called `map(<f>).unwrap_or_default()` on a `Result` value: src/core/mod.rs#L148
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/core/mod.rs:148:14 | 148 | .map(|s| s.as_str() == "true") | ______________^ 149 | | .unwrap_or_default() | |________________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
assigning the result of `Clone::clone()` may be inefficient: src/commands/init/mod.rs#L99
warning: assigning the result of `Clone::clone()` may be inefficient --> src/commands/init/mod.rs:99:9 | 99 | app.server.name = name.clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `app.server.name.clone_from(&name)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
assigning the result of `Clone::clone()` may be inefficient: src/commands/init/mod.rs#L82
warning: assigning the result of `Clone::clone()` may be inefficient --> src/commands/init/mod.rs:82:9 | 82 | app.network.as_mut().unwrap().name = name.clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `app.network.as_mut().unwrap().name.clone_from(&name)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]`
called `map(<f>).unwrap_or_default()` on a `Result` value: src/app/feedback.rs#L169
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/app/feedback.rs:169:14 | 169 | .map(|s| s.as_str() == "true") | ______________^ 170 | | .unwrap_or_default() | |________________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
called `map(<f>).unwrap_or_default()` on a `Result` value: src/app/feedback.rs#L149
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/app/feedback.rs:149:14 | 149 | .map(|s| s.as_str() == "true") | ______________^ 150 | | .unwrap_or_default() | |________________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and = note: `-W clippy::manual-is-variant-and` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_is_variant_and)]`
field `server_process` is never read: src/core/mod.rs#L29
warning: field `server_process` is never read --> src/core/mod.rs:29:9 | 20 | pub struct BuildContext<'a> { | ------------ field in this struct ... 29 | pub server_process: Option<Child>, | ^^^^^^^^^^^^^^ | = note: `BuildContext` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
trait `ProgressBarExt` is never used: src/app/progress.rs#L3
warning: trait `ProgressBarExt` is never used --> src/app/progress.rs:3:11 | 3 | pub trait ProgressBarExt {} | ^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
publish
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, docker/setup-buildx-action@v2, docker/login-action@v2, docker/metadata-action@v4, docker/build-push-action@v4. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
called `map(<f>).unwrap_or_default()` on a `Result` value: src/main.rs#L81
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/main.rs:81:10 | 81 | .map(|s| s.as_str() == "true") | __________^ 82 | | .unwrap_or_default() | |____________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
assigning the result of `Clone::clone()` may be inefficient: src/model/servertoml.rs#L152
warning: assigning the result of `Clone::clone()` may be inefficient --> src/model/servertoml.rs:152:13 | 152 | self.mc_version = v.clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.mc_version.clone_from(v)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
assigning the result of `ToOwned::to_owned()` may be inefficient: src/model/lockfile.rs#L52
warning: assigning the result of `ToOwned::to_owned()` may be inefficient --> src/model/lockfile.rs:52:9 | 52 | nw.path = path.to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `path.clone_into(&mut nw.path)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
assigning the result of `ToOwned::to_owned()` may be inefficient: src/hot_reload/config.rs#L78
warning: assigning the result of `ToOwned::to_owned()` may be inefficient --> src/hot_reload/config.rs:78:9 | 78 | h.path = path.to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `path.clone_into(&mut h.path)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
called `map(<f>).unwrap_or_default()` on a `Result` value: src/core/mod.rs#L148
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/core/mod.rs:148:14 | 148 | .map(|s| s.as_str() == "true") | ______________^ 149 | | .unwrap_or_default() | |________________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
assigning the result of `Clone::clone()` may be inefficient: src/commands/init/mod.rs#L99
warning: assigning the result of `Clone::clone()` may be inefficient --> src/commands/init/mod.rs:99:9 | 99 | app.server.name = name.clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `app.server.name.clone_from(&name)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
assigning the result of `Clone::clone()` may be inefficient: src/commands/init/mod.rs#L82
warning: assigning the result of `Clone::clone()` may be inefficient --> src/commands/init/mod.rs:82:9 | 82 | app.network.as_mut().unwrap().name = name.clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `app.network.as_mut().unwrap().name.clone_from(&name)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]`
called `map(<f>).unwrap_or_default()` on a `Result` value: src/app/feedback.rs#L169
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/app/feedback.rs:169:14 | 169 | .map(|s| s.as_str() == "true") | ______________^ 170 | | .unwrap_or_default() | |________________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and
called `map(<f>).unwrap_or_default()` on a `Result` value: src/app/feedback.rs#L149
warning: called `map(<f>).unwrap_or_default()` on a `Result` value --> src/app/feedback.rs:149:14 | 149 | .map(|s| s.as_str() == "true") | ______________^ 150 | | .unwrap_or_default() | |________________________________^ help: use: `is_ok_and(|s| s.as_str() == "true")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and = note: `-W clippy::manual-is-variant-and` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_is_variant_and)]`
field `server_process` is never read: src/core/mod.rs#L29
warning: field `server_process` is never read --> src/core/mod.rs:29:9 | 20 | pub struct BuildContext<'a> { | ------------ field in this struct ... 29 | pub server_process: Option<Child>, | ^^^^^^^^^^^^^^ | = note: `BuildContext` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
trait `ProgressBarExt` is never used: src/app/progress.rs#L3
warning: trait `ProgressBarExt` is never used --> src/app/progress.rs:3:11 | 3 | pub trait ProgressBarExt {} | ^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default