Merge pull request #63 from qiangxuhui/loong64 #202
Annotations
12 errors and 10 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
|
assigning the result of `Clone::clone()` may be inefficient:
src/model/servertoml.rs#L152
error: 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
error: 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
|
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)]`
|
assigning the result of `ToOwned::to_owned()` may be inefficient:
src/hot_reload/config.rs#L78
error: 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
|
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)]`
|
assigning the result of `Clone::clone()` may be inefficient:
src/commands/init/mod.rs#L99
error: 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
error: 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: `-D clippy::assigning-clones` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::assigning_clones)]`
|
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 }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
clippy
Clippy had exited with the 101 exit code
|
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
|
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
|
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)]`
|
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
|
clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
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/
|
build (ubuntu-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build (windows-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Deprecation notice: v1, v2, and v3 of the artifact actions
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "mcman-ubuntu-latest", "mcman-windows-latest".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
mcman-ubuntu-latest
Expired
|
8.57 MB |
|
mcman-windows-latest
Expired
|
9.89 MB |
|