Skip to content
GitHub Actions / clippy failed May 29, 2024 in 0s

clippy

5 errors, 25 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 5
Warning 25
Note 0
Help 0

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check warning on line 16 in src/commands/init.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements
  --> src/commands/init.rs:14:1
   |
14 | / pub async fn run(app: App, args: Args) -> Result<()> {
15 | |     Ok(())
16 | | }
   | |_^
   |
   = help: consider removing the `async` from this function
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async

Check warning on line 13 in src/api/models/packwiz/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements
  --> src/api/models/packwiz/mod.rs:11:5
   |
11 | /     pub async fn into_addon(&self) -> Result<Addon> {
12 | |         todo!()
13 | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async

Check warning on line 37 in src/api/models/addon/addon_source.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements
  --> src/api/models/addon/addon_source.rs:23:5
   |
23 | /     pub async fn resolve(&self, app: &App) -> Result<Vec<Addon>> {
24 | |         match self {
25 | |             AddonSource::File { path } => {
26 | |                 Ok(vec![])
...  |
36 | |         }
37 | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async

Check warning on line 25 in src/api/models/addon/addon.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements
  --> src/api/models/addon/addon.rs:23:5
   |
23 | /     async fn resolve_steps(&self) -> Result<Vec<Step>> {
24 | |         Ok(vec![])
25 | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async

Check warning on line 48 in src/api/models/step.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements
  --> src/api/models/step.rs:46:5
   |
46 | /     async fn run(&self) -> Result<StepResult> {
47 | |         Ok(StepResult::Continue)
48 | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
   = note: `-W clippy::unused-async` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_async)]`

Check failure on line 47 in src/api/app/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> src/api/app/mod.rs:47:51
   |
47 |                 addons.append(&mut source.resolve(&self).await?);
   |                                                   ^^^^^ help: change this to: `self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
   = help: to override `-D clippy::all` add `#[allow(clippy::needless_borrow)]`

Check failure on line 11 in src/api/models/packwiz/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods called `into_*` usually take `self` by value

error: methods called `into_*` usually take `self` by value
  --> src/api/models/packwiz/mod.rs:11:29
   |
11 |     pub async fn into_addon(&self) -> Result<Addon> {
   |                             ^^^^^
   |
   = help: consider choosing a less ambiguous name
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
   = note: `-D clippy::wrong-self-convention` implied by `-D clippy::all`
   = help: to override `-D clippy::all` add `#[allow(clippy::wrong_self_convention)]`

Check warning on line 18 in src/api/models/addon/addon.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field name starts with the struct's name

warning: field name starts with the struct's name
  --> src/api/models/addon/addon.rs:18:5
   |
18 |     pub addon_type: AddonType,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
   = note: `-W clippy::struct-field-names` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_field_names)]`

Check failure on line 1 in src/api/models/addon/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

module has the same name as its containing module

error: module has the same name as its containing module
 --> src/api/models/addon/mod.rs:1:1
  |
1 | mod addon;
  | ^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
  = note: `-D clippy::module-inception` implied by `-D clippy::all`
  = help: to override `-D clippy::all` add `#[allow(clippy::module_inception)]`

Check warning on line 30 in src/api/models/modpack_source.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this match arm has an identical body to another arm

warning: this match arm has an identical body to another arm
  --> src/api/models/modpack_source.rs:30:13
   |
30 |             Self::Remote { modpack_type, .. } => *modpack_type,
   |             ---------------------------------^^^^^^^^^^^^^^^^^
   |             |
   |             help: try merging the arm patterns: `Self::Remote { modpack_type, .. } | Self::Local { modpack_type, .. }`
   |
   = help: or try changing either arm body
note: other arm here
  --> src/api/models/modpack_source.rs:29:13
   |
29 |             Self::Local { modpack_type, .. } => *modpack_type,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
   = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]`

Check failure on line 24 in Cargo.toml

See this annotation in the file changed.

@github-actions github-actions / clippy

lint group `pedantic` has the same priority (0) as a lint

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 }
   |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 23 in Cargo.toml

See this annotation in the file changed.

@github-actions github-actions / clippy

lint group `all` has the same priority (0) as a lint

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 }
   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 3 in src/api/utils/accessor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

enum `Accessor` is never used

warning: enum `Accessor` is never used
 --> src/api/utils/accessor.rs:3:10
  |
3 | pub enum Accessor {
  |          ^^^^^^^^

Check warning on line 40 in src/api/app/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `collect_addons` is never used

warning: method `collect_addons` is never used
  --> src/api/app/mod.rs:40:18
   |
25 | impl App {
   | -------- method in this implementation
...
40 |     pub async fn collect_addons(&self) -> Result<Vec<Addon>> {
   |                  ^^^^^^^^^^^^^^

Check warning on line 19 in src/api/app/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

fields `http_client`, `server`, `network`, and `ci` are never read

warning: fields `http_client`, `server`, `network`, and `ci` are never read
  --> src/api/app/mod.rs:19:5
   |
18 | pub struct App {
   |            --- fields in this struct
19 |     http_client: reqwest::Client,
   |     ^^^^^^^^^^^
20 |     server: Option<Arc<RwLock<Server>>>,
   |     ^^^^^^
21 |     network: Option<Arc<RwLock<Network>>>,
   |     ^^^^^^^
22 |     ci: bool,
   |     ^^

Check warning on line 19 in src/api/models/packwiz/packwiz_pack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

static `PACK_TOML` is never used

warning: static `PACK_TOML` is never used
  --> src/api/models/packwiz/packwiz_pack.rs:19:12
   |
19 | pub static PACK_TOML: &str = "pack.toml";
   |            ^^^^^^^^^

Check warning on line 11 in src/api/models/packwiz/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `into_addon` is never used

warning: method `into_addon` is never used
  --> src/api/models/packwiz/mod.rs:11:18
   |
10 | impl PackwizMod {
   | --------------- method in this implementation
11 |     pub async fn into_addon(&self) -> Result<Addon> {
   |                  ^^^^^^^^^^

Check warning on line 23 in src/api/models/addon/addon_source.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `resolve` is never used

warning: method `resolve` is never used
  --> src/api/models/addon/addon_source.rs:23:18
   |
22 | impl AddonSource {
   | ---------------- method in this implementation
23 |     pub async fn resolve(&self, app: &App) -> Result<Vec<Addon>> {
   |                  ^^^^^^^

Check warning on line 23 in src/api/models/addon/addon.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `resolve_steps` is never used

warning: method `resolve_steps` is never used
  --> src/api/models/addon/addon.rs:23:14
   |
22 | impl Addon {
   | ---------- method in this implementation
23 |     async fn resolve_steps(&self) -> Result<Vec<Step>> {
   |              ^^^^^^^^^^^^^

Check warning on line 46 in src/api/models/step.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `run` is never used

warning: method `run` is never used
  --> src/api/models/step.rs:46:14
   |
45 | impl Step {
   | --------- method in this implementation
46 |     async fn run(&self) -> Result<StepResult> {
   |              ^^^

Check warning on line 37 in src/api/models/step.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

enum `StepResult` is never used

warning: enum `StepResult` is never used
  --> src/api/models/step.rs:37:10
   |
37 | pub enum StepResult {
   |          ^^^^^^^^^^

Check warning on line 20 in src/api/models/modpack_source.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `accessor` and `modpack_type` are never used

warning: methods `accessor` and `modpack_type` are never used
  --> src/api/models/modpack_source.rs:20:12
   |
19 | impl ModpackSource {
   | ------------------ methods in this implementation
20 |     pub fn accessor(&self) -> Result<Accessor> {
   |            ^^^^^^^^
...
27 |     pub fn modpack_type(&self) -> ModpackType {
   |            ^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 14 in src/commands/init.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `args`

warning: unused variable: `args`
  --> src/commands/init.rs:14:28
   |
14 | pub async fn run(app: App, args: Args) -> Result<()> {
   |                            ^^^^ help: if this is intentional, prefix it with an underscore: `_args`

Check warning on line 14 in src/commands/init.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `app`

warning: unused variable: `app`
  --> src/commands/init.rs:14:18
   |
14 | pub async fn run(app: App, args: Args) -> Result<()> {
   |                  ^^^ help: if this is intentional, prefix it with an underscore: `_app`

Check warning on line 33 in src/api/models/addon/addon_source.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `modpack`

warning: unused variable: `modpack`
  --> src/api/models/addon/addon_source.rs:33:36
   |
33 |             AddonSource::Modpack { modpack } => {
   |                                    ^^^^^^^ help: try ignoring the field: `modpack: _`