Skip to content

oh hey it somewhat works

Sign in for the full log view
GitHub Actions / clippy failed Jun 5, 2024 in 1s

clippy

18 errors, 76 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 18
Warning 76
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 41 in src/api/utils/accessor.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/utils/accessor.rs:32:5
   |
32 | /     pub async fn dir(&self) -> Result<Vec<String>> {
33 | |         match self {
34 | |             Accessor::ZipLocal(zip) => Ok(zip.file_names().map(ToOwned::to_owned).collect()),
35 | |             Accessor::Local(path) => Ok(path.read_dir()?
...  |
40 | |         }
41 | |     }
   | |_____^
   |
   = 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 40 in src/api/app/actions/init/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/app/actions/init/mod.rs:27:5
   |
27 | /     pub async fn init_network(&mut self) -> Result<()> {
28 | |         intro("initializing network")?;
29 | |
30 | |         let name: String = input("Name of the network?")
...  |
39 | |         Ok(())
40 | |     }
   | |_____^
   |
   = 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/app/actions/init/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/app/actions/init/mod.rs:10:5
   |
10 | /     pub async fn init_server(&mut self) -> Result<()> {
11 | |         intro("initializing server")?;
12 | |
13 | |         let name: String = input("Name of the server?")
...  |
24 | |         Ok(())
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 37 in src/api/models/mrpack/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/mrpack/mod.rs:31:5
   |
31 | /     pub async fn into_addon(&self) -> Result<Addon> {
32 | |         Ok(Addon {
33 | |             environment: self.env.as_ref().map(|e| e.clone().into()),
34 | |             addon_type: AddonType::Url { url: self.downloads.first().ok_or(anyhow!("No downloads"))?.clone() },
35 | |             target: AddonTarget::from_path(&self.path),
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 61 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:38:5
   |
38 | /     pub async fn into_addon(&self, app: &App, target: AddonTarget) -> Result<Addon> {
39 | |         let addon_type = if let Some(update) = &self.update {
40 | |             match update {
41 | |                 PackwizModUpdate::Modrinth { mod_id, version } => AddonType::Modrinth { id: mod_id.clone(), version: version.clone() },
...  |
60 | |         Ok(addon)
61 | |     }
   | |_____^
   |
   = 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 46 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:44:5
   |
44 | /     async fn run(&self) -> Result<StepResult> {
45 | |         Ok(StepResult::Continue)
46 | |     }
   | |_____^
   |
   = 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 28 in src/api/sources/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::string::String`

error: useless conversion to the same type: `std::string::String`
  --> src/api/sources/mod.rs:28:18
   |
28 |             url: url.into(),
   |                  ^^^^^^^^^^ help: consider removing `.into()`: `url`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
   = note: `-D clippy::useless-conversion` implied by `-D clippy::all`
   = help: to override `-D clippy::all` add `#[allow(clippy::useless_conversion)]`

Check failure on line 29 in src/api/sources/modrinth/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

question mark operator is useless here

error: question mark operator is useless here
  --> src/api/sources/modrinth/mod.rs:29:9
   |
29 |         Ok(self.fetch_all_versions(id).await?)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.fetch_all_versions(id).await`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark

Check warning on line 30 in src/api/sources/vanilla/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

wildcard matches only a single variant and will also match any future added variants

warning: wildcard matches only a single variant and will also match any future added variants
  --> src/api/sources/vanilla/mod.rs:30:13
   |
30 |             _ => bail!("You cant have both smh"),
   |             ^ help: try: `Environment::Both`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
   = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]`

Check warning on line 201 in src/api/sources/vanilla/version.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
   --> src/api/sources/vanilla/version.rs:201:10
    |
201 |     /// (AssetIndex only) The size of the game version's assets
    |          ^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
    |
201 |     /// (`AssetIndex` only) The size of the game version's assets
    |          ~~~~~~~~~~~~

Check warning on line 199 in src/api/sources/vanilla/version.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
   --> src/api/sources/vanilla/version.rs:199:10
    |
199 |     /// (AssetIndex only) The game version ID the assets are for
    |          ^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
    |
199 |     /// (`AssetIndex` only) The game version ID the assets are for
    |          ~~~~~~~~~~~~

Check warning on line 171 in src/api/sources/vanilla/version.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
   --> src/api/sources/vanilla/version.rs:171:13
    |
171 |     /// The HashMap key specifies a classifier as additional information for downloading files
    |             ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
    |
171 |     /// The `HashMap` key specifies a classifier as additional information for downloading files
    |             ~~~~~~~~~

Check warning on line 109 in src/api/sources/vanilla/version.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

possible intra-doc link using quotes instead of backticks

warning: possible intra-doc link using quotes instead of backticks
   --> src/api/sources/vanilla/version.rs:109:25
    |
109 |     ///     "exclude": ["META-INF/"],
    |                         ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_link_with_quotes
    = note: `-W clippy::doc-link-with-quotes` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_link_with_quotes)]`

Check failure on line 37 in src/api/sources/vanilla/version.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/sources/vanilla/version.rs:37:22
   |
37 |     pub fn into_step(&self, ty: DownloadType) -> Option<Vec<Step>> {
   |                      ^^^^^
   |
   = 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

Check failure on line 52 in src/api/utils/pathdiff.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant guard

error: redundant guard
  --> src/api/utils/pathdiff.rs:52:39
   |
52 |                 (Some(_), Some(b)) if b == Component::ParentDir => return None,
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
   |
52 -                 (Some(_), Some(b)) if b == Component::ParentDir => return None,
52 +                 (Some(_), Some(Component::ParentDir)) => return None,
   |

Check failure on line 51 in src/api/utils/pathdiff.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant guard

error: redundant guard
  --> src/api/utils/pathdiff.rs:51:39
   |
51 |                 (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
   |                                       ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
   = note: `-D clippy::redundant-guards` implied by `-D clippy::all`
   = help: to override `-D clippy::all` add `#[allow(clippy::redundant_guards)]`
help: try
   |
51 -                 (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
51 +                 (Some(a), Some(Component::CurDir)) => comps.push(a),
   |

Check warning on line 65 in src/api/utils/pathdiff.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary `!=` operation

warning: unnecessary `!=` operation
  --> src/api/utils/pathdiff.rs:31:5
   |
31 | /     if path.is_absolute() != base.is_absolute() {
32 | |         if path.is_absolute() {
33 | |             Some(PathBuf::from(path))
34 | |         } else {
...  |
64 | |         Some(comps.iter().map(|c| c.as_os_str()).collect())
65 | |     }
   | |_____^
   |
   = help: change to `==` and swap the blocks of the `if`/`else`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
   = note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

warning: usage of wildcard import
 --> src/api/utils/pathdiff.rs:3:5
  |
3 | use std::path::*;
  |     ^^^^^^^^^^^^ help: try: `std::path::{Component, Path, PathBuf}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports

Check warning on line 1 in src/api/utils/pathdiff.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should put bare URLs between `<`/`>` or make a proper Markdown link

warning: you should put bare URLs between `<`/`>` or make a proper Markdown link
 --> src/api/utils/pathdiff.rs:1:5
  |
1 | //! https://github.com/Manishearth/pathdiff
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
  = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
  = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
  --> src/api/utils/accessor.rs:36:29
   |
36 |                 .filter_map(|r| r.ok())
   |                             ^^^^^^^^^^ help: replace the closure with the method itself: `std::result::Result::ok`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
   = note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

case-sensitive file extension comparison

warning: case-sensitive file extension comparison
  --> src/api/utils/accessor.rs:23:19
   |
23 |         } else if str.ends_with(".zip") || str.ends_with(".mrpack") {
   |                   ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a case-insensitive comparison instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#case_sensitive_file_extension_comparisons
   = note: `-W clippy::case-sensitive-file-extension-comparisons` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::case_sensitive_file_extension_comparisons)]`
help: use std::path::Path
   |
23 ~         } else if std::path::Path::new(str)
24 +             .extension()
25 ~             .map_or(false, |ext| ext.eq_ignore_ascii_case("zip")) || str.ends_with(".mrpack") {
   |

Check failure on line 119 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:119:58
    |
119 |                 addons.append(&mut source.resolve_addons(&self).await?);
    |                                                          ^^^^^ help: change this to: `self`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 66 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:66:24
   |
66 |             write_toml(&path, NETWORK_TOML, &*network)?;
   |                        ^^^^^ help: change this to: `path`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 61 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:61:24
   |
61 |             write_toml(&path, SERVER_TOML, &*server)?;
   |                        ^^^^^ help: change this to: `path`
   |
   = 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 warning on line 30 in src/api/models/server/server_flavor.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/server/server_flavor.rs:30:13
   |
30 |             ServerFlavor::Patched => true,
   |             ---------------------^^^^^^^^
   |             |
   |             help: try merging the arm patterns: `ServerFlavor::Patched | ServerFlavor::Proxy`
   |
   = help: or try changing either arm body
note: other arm here
  --> src/api/models/server/server_flavor.rs:31:13
   |
31 |             ServerFlavor::Proxy => true,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms