Skip to content

java checker and finder #222

java checker and finder

java checker and finder #222

Triggered via push June 22, 2024 13:35
Status Failure
Total duration 3m 45s
Artifacts 2

build.yml

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

Annotations

32 errors and 148 warnings
this expression creates a reference which is immediately dereferenced by the compiler: src/commands/build.rs#L18
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/commands/build.rs:18:31 | 18 | app.action_install_addons(&base) | ^^^^^ help: change this to: `base` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/commands/build.rs#L15
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/commands/build.rs:15:28 | 15 | app.action_install_jar(&base) | ^^^^^ help: change this to: `base` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the borrowed expression implements the required traits: src/api/utils/mod.rs#L34
error: the borrowed expression implements the required traits --> src/api/utils/mod.rs:34:59 | 34 | let data: T = toml::from_str(&std::fs::read_to_string(&path)?)?; | ^^^^^ help: change this to: `path` | = 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)]`
redundant guard: src/api/utils/pathdiff.rs#L72
error: redundant guard --> src/api/utils/pathdiff.rs:72:39 | 72 | (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 | 72 - (Some(_), Some(b)) if b == Component::ParentDir => return None, 72 + (Some(_), Some(Component::ParentDir)) => return None, |
redundant guard: src/api/utils/pathdiff.rs#L71
error: redundant guard --> src/api/utils/pathdiff.rs:71:39 | 71 | (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 | 71 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a), 71 + (Some(a), Some(Component::CurDir)) => comps.push(a), |
using `clone` on type `HashFormat` which implements the `Copy` trait: src/api/utils/hashing/mod.rs#L58
error: using `clone` on type `HashFormat` which implements the `Copy` trait --> src/api/utils/hashing/mod.rs:58:24 | 58 | .map(|(k, v)| (k.clone(), v.clone())) | ^^^^^^^^^ help: try dereferencing it: `*k` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
question mark operator is useless here: src/api/sources/spigot/mod.rs#L23
error: question mark operator is useless here --> src/api/sources/spigot/mod.rs:23:9 | 23 | Ok(self.0.http_get_json(format!("{}/{url}", self.0.options.api_urls.spiget)).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.0.http_get_json(format!("{}/{url}", self.0.options.api_urls.spiget)).await` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
empty doc comment: src/api/sources/hangar/models.rs#L268
error: empty doc comment --> src/api/sources/hangar/models.rs:268:1 | 268 | /// | ^^^ | = help: consider removing or filling it = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs = note: `-D clippy::empty-docs` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::empty_docs)]`
direct implementation of `ToString`: src/api/sources/hangar/models.rs#L180
error: direct implementation of `ToString` --> src/api/sources/hangar/models.rs:180:1 | 180 | / impl ToString for Platform { 181 | | fn to_string(&self) -> String { 182 | | match self { 183 | | Self::Paper => "PAPER".to_owned(), ... | 187 | | } 188 | | } | |_^ | = 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/api/sources/hangar/models.rs#L12
error: direct implementation of `ToString` --> src/api/sources/hangar/models.rs:12:1 | 12 | / impl ToString for Namespace { 13 | | fn to_string(&self) -> String { 14 | | format!("{}/{}", self.owner, self.slug) 15 | | } 16 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
this expression creates a reference which is immediately dereferenced by the compiler: src/api/sources/papermc/mod.rs#L71
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/api/sources/papermc/mod.rs:71:56 | 71 | let resolved_build = self.fetch_build(project, &version, build).await?; | ^^^^^^^^ help: change this to: `version` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
methods called `into_*` usually take `self` by value: src/api/sources/vanilla/mod.rs#L20
error: methods called `into_*` usually take `self` by value --> src/api/sources/vanilla/mod.rs:20:22 | 20 | 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
useless conversion to the same type: `std::string::String`: src/api/sources/url/mod.rs#L25
error: useless conversion to the same type: `std::string::String` --> src/api/sources/url/mod.rs:25:14 | 25 | 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)]`
called `map(..).flatten()` on `Option`: src/api/sources/modrinth/mod.rs#L53
error: called `map(..).flatten()` on `Option` --> src/api/sources/modrinth/mod.rs:53:42 | 53 | if let Some(id) = store.as_ref().map(|ids| ids.get(slug)).flatten() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|ids| ids.get(slug))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
question mark operator is useless here: src/api/sources/modrinth/mod.rs#L33
error: question mark operator is useless here --> src/api/sources/modrinth/mod.rs:33:9 | 33 | 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
using `clone` on type `ServerFlavor` which implements the `Copy` trait: src/api/models/server/server_type.rs#L114
error: using `clone` on type `ServerFlavor` which implements the `Copy` trait --> src/api/models/server/server_type.rs:114:50 | 114 | ServerType::Custom { flavor, .. } => flavor.clone(), | ^^^^^^^^^^^^^^ help: try dereferencing it: `*flavor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-D clippy::clone-on-copy` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::clone_on_copy)]`
direct implementation of `ToString`: src/api/models/server/server_type.rs#L32
error: direct implementation of `ToString` --> src/api/models/server/server_type.rs:32:1 | 32 | / impl ToString for PaperMCProject { 33 | | fn to_string(&self) -> String { 34 | | match self { 35 | | Self::Paper => "paper".to_owned(), ... | 39 | | } 40 | | } | |_^ | = 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)]`
match expression looks like `matches!` macro: src/api/models/server/server_flavor.rs#L22
error: match expression looks like `matches!` macro --> src/api/models/server/server_flavor.rs:22:9 | 22 | / match self { 23 | | ServerFlavor::Modded => true, 24 | | _ => false, 25 | | } | |_________^ help: try: `matches!(self, ServerFlavor::Modded)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
match expression looks like `matches!` macro: src/api/models/server/server_flavor.rs#L15
error: match expression looks like `matches!` macro --> src/api/models/server/server_flavor.rs:15:9 | 15 | / match self { 16 | | ServerFlavor::Proxy => false, 17 | | _ => true, 18 | | } | |_________^ help: try: `!matches!(self, ServerFlavor::Proxy)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro = note: `-D clippy::match-like-matches-macro` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::match_like_matches_macro)]`
methods called `into_*` usually take `self` by value: src/api/models/packwiz/mod.rs#L35
error: methods called `into_*` usually take `self` by value --> src/api/models/packwiz/mod.rs:35:29 | 35 | pub async fn into_addon(&self, app: &App, target: AddonTarget) -> 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
methods called `into_*` usually take `self` by value: src/api/models/mrpack/mod.rs#L28
error: methods called `into_*` usually take `self` by value --> src/api/models/mrpack/mod.rs:28:29 | 28 | 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
methods called `into_*` usually take `self` by value: src/api/models/addon/addon_metadata.rs#L22
error: methods called `into_*` usually take `self` by value --> src/api/models/addon/addon_metadata.rs:22:21 | 22 | pub fn into_str(&self) -> &'static str { | ^^^^^ | = 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)]`
module has the same name as its containing module: src/api/models/addon/mod.rs#L1
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)]`
question mark operator is useless here: src/api/models/modpack_source.rs#L27
error: question mark operator is useless here --> src/api/models/modpack_source.rs:27:9 | 27 | Ok(Accessor::from(str)?) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `Accessor::from(str)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `-D clippy::needless-question-mark` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::needless_question_mark)]`
this expression creates a reference which is immediately dereferenced by the compiler: src/api/app/io.rs#L27
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/api/app/io.rs:27:24 | 27 | 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
this expression creates a reference which is immediately dereferenced by the compiler: src/api/app/io.rs#L23
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/api/app/io.rs:23:24 | 23 | 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
this expression creates a reference which is immediately dereferenced by the compiler: src/api/app/collect.rs#L22
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/api/app/collect.rs:22:61 | 22 | addons.extend_from_slice(&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
this expression creates a reference which is immediately dereferenced by the compiler: src/api/app/actions/build/mod.rs#L13
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/api/app/actions/build/mod.rs:13:43 | 13 | let steps = jar.resolve_steps(&self, Environment::Server).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)]`
called `map(..).flatten()` on `Option`: src/api/app/actions/build/mod.rs#L10
error: called `map(..).flatten()` on `Option` --> src/api/app/actions/build/mod.rs:10:62 | 10 | if let Some(jar) = self.server.read().await.as_ref().map(|(_, server)| { | ______________________________________________________________^ 11 | | server.jar.clone() 12 | | }).flatten() { | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten = note: `-D clippy::map-flatten` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::map_flatten)]` help: try replacing `map` with `and_then` and remove the `.flatten()` | 10 ~ if let Some(jar) = self.server.read().await.as_ref().and_then(|(_, server)| { 11 + server.jar.clone() 12 ~ }) { |
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
unused `async` for function with no await statements: src/api/utils/accessor.rs#L35
warning: unused `async` for function with no await statements --> src/api/utils/accessor.rs:35:5 | 35 | / pub async fn dir(&self) -> Result<Vec<String>> { 36 | | match self { 37 | | Accessor::ZipLocal(zip) => Ok(zip.file_names().map(ToOwned::to_owned).collect()), 38 | | Accessor::Local(path) => Ok(path ... | 44 | | } 45 | | } | |_____^ | = 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
unused `async` for function with no await statements: src/api/sources/spigot/mod.rs#L51
warning: unused `async` for function with no await statements --> src/api/sources/spigot/mod.rs:51:5 | 51 | / pub async fn resolve_steps(&self, id: &str, version: &str) -> Result<Vec<Step>> { 52 | | let url = format!( 53 | | "{}/resources/{}/versions/{}/download/proxy", 54 | | self.0.options.api_urls.spiget, ... | 68 | | ]) 69 | | } | |_____^ | = 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
unused `async` for function with no await statements: src/api/sources/fabric/mod.rs#L25
warning: unused `async` for function with no await statements --> src/api/sources/fabric/mod.rs:25:5 | 25 | / pub async fn resolve_steps( 26 | | &self, 27 | | mc_version: &str, 28 | | loader: &str, ... | 45 | | ]) 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
unused `async` for function with no await statements: src/api/sources/maven/mod.rs#L83
warning: unused `async` for function with no await statements --> src/api/sources/maven/mod.rs:83:5 | 83 | / pub async fn resolve_steps( 84 | | &self, 85 | | url: &str, 86 | | group_id: &str, ... | 119 | | ]) 120 | | } | |_____^ | = 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
unused `async` for function with no await statements: src/api/models/packwiz/mod.rs#L35
warning: unused `async` for function with no await statements --> src/api/models/packwiz/mod.rs:35:5 | 35 | / pub async fn into_addon(&self, app: &App, target: AddonTarget) -> Result<Addon> { 36 | | let addon_type = if let Some(update) = &self.update { 37 | | match update { 38 | | PackwizModUpdate::Modrinth { mod_id, version } => AddonType::Modrinth { ... | 64 | | Ok(addon) 65 | | } | |_____^ | = 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
unused `async` for function with no await statements: src/api/models/mrpack/mod.rs#L28
warning: unused `async` for function with no await statements --> src/api/models/mrpack/mod.rs:28:5 | 28 | / pub async fn into_addon(&self) -> Result<Addon> { 29 | | Ok(Addon { 30 | | environment: self.env.as_ref().map(|e| e.clone().into()), 31 | | addon_type: AddonType::Url { ... | 39 | | }) 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
unused `async` for function with no await statements: src/api/app/actions/init/mod.rs#L46
warning: unused `async` for function with no await statements --> src/api/app/actions/init/mod.rs:46:5 | 46 | / pub async fn action_init_network(&self) -> Result<()> { 47 | | cliclack::intro("initializing network")?; 48 | | 49 | | let name: String = cliclack::input("Name of the network?").interact()?; ... | 55 | | Ok(()) 56 | | } | |_____^ | = 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)]`
unnecessary `!=` operation: src/api/utils/pathdiff.rs#L51
warning: unnecessary `!=` operation --> src/api/utils/pathdiff.rs:51:5 | 51 | / if path.is_absolute() != base.is_absolute() { 52 | | if path.is_absolute() { 53 | | Some(PathBuf::from(path)) 54 | | } else { ... | 84 | | Some(comps.iter().map(|c| c.as_os_str()).collect()) 85 | | } | |_____^ | = 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
usage of wildcard import: src/api/utils/pathdiff.rs#L23
warning: usage of wildcard import --> src/api/utils/pathdiff.rs:23:5 | 23 | 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
you should put bare URLs between `<`/`>` or make a proper Markdown link: src/api/utils/pathdiff.rs#L1
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
this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte): src/api/utils/hashing/mod.rs#L25
warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> src/api/utils/hashing/mod.rs:25:23 | 25 | pub fn get_digest(&self) -> Box<dyn DynDigest + Send> { | ^^^^^ help: consider passing by value instead: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
consider adding a `;` to the last statement for consistent formatting: src/api/utils/hashing/curseforge.rs#L24
warning: consider adding a `;` to the last statement for consistent formatting --> src/api/utils/hashing/curseforge.rs:24:9 | 24 | self.0 = Vec::new() | ^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.0 = Vec::new();` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
consider adding a `;` to the last statement for consistent formatting: src/api/utils/hashing/curseforge.rs#L14
warning: consider adding a `;` to the last statement for consistent formatting --> src/api/utils/hashing/curseforge.rs:14:9 | 14 | / self.0.extend( 15 | | data.iter() 16 | | .copied() 17 | | .filter(|&e| e != 9 && e != 10 && e != 13 && e != 32), 18 | | ) | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned = note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]` help: add a `;` here | 14 ~ self.0.extend( 15 + data.iter() 16 + .copied() 17 + .filter(|&e| e != 9 && e != 10 && e != 13 && e != 32), 18 + ); |
redundant closure: src/api/utils/accessor.rs#L40
warning: redundant closure --> src/api/utils/accessor.rs:40:29 | 40 | .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)]`
case-sensitive file extension comparison: src/api/utils/accessor.rs#L26
warning: case-sensitive file extension comparison --> src/api/utils/accessor.rs:26:19 | 26 | } 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 help: use std::path::Path | 26 ~ } else if std::path::Path::new(str) 27 + .extension() 28 ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("zip")) || str.ends_with(".mrpack") { |
unnecessary `!=` operation: src/api/tools/java/check.rs#L10
warning: unnecessary `!=` operation --> src/api/tools/java/check.rs:10:16 | 10 | let java = if path.file_name()?.to_str()? != JAVA_BIN { | ________________^ 11 | | path.join(JAVA_BIN) 12 | | } else { 13 | | path.clone() 14 | | }; | |_____^ | = 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)]`
item in documentation is missing backticks: src/api/tools/java/installation.rs#L16
warning: item in documentation is missing backticks --> src/api/tools/java/installation.rs:16:6 | 16 | /// "1.8.0_361" -> (1, 8) | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 16 | /// "`1.8.0_361`" -> (1, 8) | ~~~~~~~~~~~
wildcard matches only a single variant and will also match any future added variants: src/api/sources/vanilla/mod.rs#L57
warning: wildcard matches only a single variant and will also match any future added variants --> src/api/sources/vanilla/mod.rs:57:13 | 57 | _ => 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)]`
item in documentation is missing backticks: src/api/sources/vanilla/version.rs#L179
warning: item in documentation is missing backticks --> src/api/sources/vanilla/version.rs:179:10 | 179 | /// (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 | 179 | /// (`AssetIndex` only) The size of the game version's assets | ~~~~~~~~~~~~
item in documentation is missing backticks: src/api/sources/vanilla/version.rs#L177
warning: item in documentation is missing backticks --> src/api/sources/vanilla/version.rs:177:10 | 177 | /// (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 | 177 | /// (`AssetIndex` only) The game version ID the assets are for | ~~~~~~~~~~~~
item in documentation is missing backticks: src/api/sources/vanilla/version.rs#L149
warning: item in documentation is missing backticks --> src/api/sources/vanilla/version.rs:149:13 | 149 | /// 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 = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` help: try | 149 | /// The `HashMap` key specifies a classifier as additional information for downloading files | ~~~~~~~~~
possible intra-doc link using quotes instead of backticks: src/api/sources/vanilla/version.rs#L87
warning: possible intra-doc link using quotes instead of backticks --> src/api/sources/vanilla/version.rs:87:25 | 87 | /// "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)]`
usage of wildcard import: src/api/models/server/server_type.rs#L5
warning: usage of wildcard import --> src/api/models/server/server_type.rs:5:5 | 5 | utils::serde::*, | ^^^^^^^^^^^^^^^ help: try: `utils::serde::str_latest` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports = note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`
this match arm has an identical body to another arm: src/api/models/server/server_flavor.rs#L32
warning: this match arm has an identical body to another arm --> src/api/models/server/server_flavor.rs:32:13 | 32 | 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:33:13 | 33 | ServerFlavor::Proxy => true, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
this match arm has an identical body to another arm: src/api/models/server/server_flavor.rs#L31
warning: this match arm has an identical body to another arm --> src/api/models/server/server_flavor.rs:31:13 | 31 | ServerFlavor::Modded => false, | --------------------^^^^^^^^^ | | | help: try merging the arm patterns: `ServerFlavor::Modded | ServerFlavor::Vanilla` | = help: or try changing either arm body note: other arm here --> src/api/models/server/server_flavor.rs:30:13 | 30 | ServerFlavor::Vanilla => false, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte): src/api/models/server/server_flavor.rs#L28
warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> src/api/models/server/server_flavor.rs:28:29 | 28 | pub fn supports_plugins(&self) -> bool { | ^^^^^ help: consider passing by value instead: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte): src/api/models/server/server_flavor.rs#L21
warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> src/api/models/server/server_flavor.rs:21:26 | 21 | pub fn supports_mods(&self) -> bool { | ^^^^^ help: consider passing by value instead: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte): src/api/models/server/server_flavor.rs#L14
warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> src/api/models/server/server_flavor.rs:14:31 | 14 | pub fn supports_datapacks(&self) -> bool { | ^^^^^ help: consider passing by value instead: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
called `map(<f>).unwrap_or(<a>)` on an `Option` value: src/api/models/addon/addon_target.rs#L37
warning: called `map(<f>).unwrap_or(<a>)` on an `Option` value --> src/api/models/addon/addon_target.rs:37:14 | 37 | &Path::new(path) | ______________^ 38 | | .parent() 39 | | .map(|p| p.to_string_lossy().into_owned()) 40 | | .unwrap_or(".".to_owned()), | |__________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` help: use `map_or(<a>, <f>)` instead | 39 - .map(|p| p.to_string_lossy().into_owned()) 39 + .map_or(".".to_owned(), |p| p.to_string_lossy().into_owned()), |
this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte): src/api/models/addon/addon_metadata.rs#L35
warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> src/api/models/addon/addon_metadata.rs:35:21 | 35 | pub fn icon_url(&self) -> String { | ^^^^^ help: consider passing by value instead: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte): src/api/models/addon/addon_metadata.rs#L22
warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> src/api/models/addon/addon_metadata.rs:22:21 | 22 | pub fn into_str(&self) -> &'static str { | ^^^^^ help: consider passing by value instead: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]`
field name starts with the struct's name: src/api/models/addon/addon.rs#L12
warning: field name starts with the struct's name --> src/api/models/addon/addon.rs:12:5 | 12 | 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)]`
case-sensitive file extension comparison: src/api/models/source.rs#L30
warning: case-sensitive file extension comparison --> src/api/models/source.rs:30:71 | 30 | let file: AddonListFile = read_toml(&PathBuf::from(if path.ends_with(".toml") { | ^^^^^^^^^^^^^^^^^^^^^^^ | = 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 | 30 ~ let file: AddonListFile = read_toml(&PathBuf::from(if std::path::Path::new(path) 31 + .extension() 32 ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("toml")) { |
this match arm has an identical body to another arm: src/api/models/modpack_source.rs#L33
warning: this match arm has an identical body to another arm --> src/api/models/modpack_source.rs:33:13 | 33 | 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:32:13 | 32 | 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)]`
adding items after statements is confusing, since items exist from the start of the scope: src/api/app/actions/build/mod.rs#L25
warning: adding items after statements is confusing, since items exist from the start of the scope --> src/api/app/actions/build/mod.rs:25:9 | 25 | const MAX_CONCURRENT_TASKS: usize = 20; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements = note: `-W clippy::items-after-statements` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::items_after_statements)]`
method `diff_to` is never used: src/api/utils/pathdiff.rs#L4
warning: method `diff_to` is never used --> src/api/utils/pathdiff.rs:4:8 | 3 | pub trait DiffTo { | ------ method in this trait 4 | fn diff_to<P>(&self, path: P) -> Option<PathBuf> | ^^^^^^^
method `dir` is never used: src/api/utils/accessor.rs#L35
warning: method `dir` is never used --> src/api/utils/accessor.rs:35:18 | 22 | impl Accessor { | ------------- method in this implementation ... 35 | pub async fn dir(&self) -> Result<Vec<String>> { | ^^^
function `write_toml` is never used: src/api/utils/mod.rs#L39
warning: function `write_toml` is never used --> src/api/utils/mod.rs:39:8 | 39 | pub fn write_toml<T: Serialize>(path: &Path, filename: &str, value: &T) -> Result<()> { | ^^^^^^^^^^
function `check_java` is never used: src/api/tools/java/check.rs#L5
warning: function `check_java` is never used --> src/api/tools/java/check.rs:5:8 | 5 | pub fn check_java(path: &Path) -> Option<JavaInstallation> { | ^^^^^^^^^^
function `get_possible_java_locations` is never used: src/api/tools/java/find.rs#L58
warning: function `get_possible_java_locations` is never used --> src/api/tools/java/find.rs:58:4 | 58 | fn get_possible_java_locations() -> HashMap<&'static str, Vec<JavaLocation>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
function `collect_possible_java_paths` is never used: src/api/tools/java/find.rs#L18
warning: function `collect_possible_java_paths` is never used --> src/api/tools/java/find.rs:18:15 | 18 | pub(super) fn collect_possible_java_paths() -> HashSet<PathBuf> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
function `env_paths` is never used: src/api/tools/java/find.rs#L12
warning: function `env_paths` is never used --> src/api/tools/java/find.rs:12:4 | 12 | fn env_paths() -> HashSet<PathBuf> { | ^^^^^^^^^
enum `JavaLocation` is never used: src/api/tools/java/find.rs#L6
warning: enum `JavaLocation` is never used --> src/api/tools/java/find.rs:6:6 | 6 | enum JavaLocation { | ^^^^^^^^^^^^
function `extract_java_majorminor_version` is never used: src/api/tools/java/installation.rs#L18
warning: function `extract_java_majorminor_version` is never used --> src/api/tools/java/installation.rs:18:8 | 18 | pub fn extract_java_majorminor_version( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct `JavaInstallation` is never constructed: src/api/tools/java/installation.rs#L7
warning: struct `JavaInstallation` is never constructed --> src/api/tools/java/installation.rs:7:12 | 7 | pub struct JavaInstallation { | ^^^^^^^^^^^^^^^^
function `get_java_installations` is never used: src/api/tools/java/mod.rs#L11
warning: function `get_java_installations` is never used --> src/api/tools/java/mod.rs:11:8 | 11 | pub fn get_java_installations() -> Vec<JavaInstallation> { | ^^^^^^^^^^^^^^^^^^^^^^
type alias `JavaVersion` is never used: src/api/tools/java/mod.rs#L2
warning: type alias `JavaVersion` is never used --> src/api/tools/java/mod.rs:2:10 | 2 | pub type JavaVersion = u32; | ^^^^^^^^^^^
constant `JAVA_BIN` is never used: src/api/tools/java/mod.rs#L1
warning: constant `JAVA_BIN` is never used --> src/api/tools/java/mod.rs:1:11 | 1 | pub const JAVA_BIN: &str = "java"; | ^^^^^^^^
methods `fetch_api`, `fetch_resource`, `fetch_versions`, `fetch_version`, and `resolve_steps` are never used: src/api/sources/spigot/mod.rs#L22
warning: methods `fetch_api`, `fetch_resource`, `fetch_versions`, `fetch_version`, and `resolve_steps` are never used --> src/api/sources/spigot/mod.rs:22:18 | 21 | impl<'a> SpigotAPI<'a> { | ---------------------- methods in this implementation 22 | pub async fn fetch_api<T: DeserializeOwned>(&self, url: &str) -> Result<T> { | ^^^^^^^^^ ... 26 | pub async fn fetch_resource(&self, id: &str) -> Result<SpigotResource> { | ^^^^^^^^^^^^^^ ... 35 | pub async fn fetch_versions(&self, id: &str) -> Result<Vec<SpigotVersionDetailed>> { | ^^^^^^^^^^^^^^ ... 43 | pub async fn fetch_version(&self, id: &str, version: &str) -> Result<SpigotVersionDetailed> { | ^^^^^^^^^^^^^ ... 51 | pub async fn resolve_steps(&self, id: &str, version: &str) -> Result<Vec<Step>> { | ^^^^^^^^^^^^^
struct `SpigotAPI` is never constructed: src/api/sources/spigot/mod.rs#L19
warning: struct `SpigotAPI` is never constructed --> src/api/sources/spigot/mod.rs:19:12 | 19 | pub struct SpigotAPI<'a>(pub &'a App); | ^^^^^^^^^
function `resource_id` is never used: src/api/sources/spigot/mod.rs#L9
warning: function `resource_id` is never used --> src/api/sources/spigot/mod.rs:9:8 | 9 | pub fn resource_id(slug: &str) -> &str { | ^^^^^^^^^^^
methods `fetch_builds`, `fetch_build`, `fetch_artifacts`, `fetch_artifact`, `resolve_steps`, and `fetch_description` are never used: src/api/sources/jenkins/mod.rs#L22
warning: methods `fetch_builds`, `fetch_build`, `fetch_artifacts`, `fetch_artifact`, `resolve_steps`, and `fetch_description` are never used --> src/api/sources/jenkins/mod.rs:22:18 | 21 | impl<'a> JenkinsAPI<'a> { | ----------------------- methods in this implementation 22 | pub async fn fetch_builds(&self, url: &str, job: &str) -> Result<Vec<JenkinsBuild>> { | ^^^^^^^^^^^^ ... 33 | pub async fn fetch_build(&self, url: &str, job: &str, build: &str) -> Result<JenkinsBuild> { | ^^^^^^^^^^^ ... 55 | pub async fn fetch_artifacts(&self, build_url: &str) -> Result<Vec<JenkinsArtifact>> { | ^^^^^^^^^^^^^^^ ... 66 | pub async fn fetch_artifact( | ^^^^^^^^^^^^^^ ... 96 | pub async fn resolve_steps( | ^^^^^^^^^^^^^ ... 139 | pub async fn fetch_description(&self, url: &str, job: &str) -> Result<Option<String>> { | ^^^^^^^^^^^^^^^^^
struct `JenkinsAPI` is never constructed: src/api/sources/jenkins/mod.rs#L19
warning: struct `JenkinsAPI` is never constructed --> src/api/sources/jenkins/mod.rs:19:12 | 19 | pub struct JenkinsAPI<'a>(pub &'a App); | ^^^^^^^^^^
function `jenkins_job_url` is never used: src/api/sources/jenkins/mod.rs#L12
warning: function `jenkins_job_url` is never used --> src/api/sources/jenkins/mod.rs:12:8 | 12 | pub fn jenkins_job_url(url: &str, job: &str) -> String { | ^^^^^^^^^^^^^^^
static `SUCCESS_STR` is never used: src/api/sources/jenkins/mod.rs#L10
warning: static `SUCCESS_STR` is never used --> src/api/sources/jenkins/mod.rs:10:8 | 10 | static SUCCESS_STR: &str = "SUCCESS"; | ^^^^^^^^^^^
methods `get_url` and `get_file_info` are never used: src/api/sources/hangar/models.rs#L208
warning: methods `get_url` and `get_file_info` are never used --> src/api/sources/hangar/models.rs:208:12 | 206 | impl PlatformVersionDownload { | ---------------------------- methods in this implementation 207 | #[must_use] 208 | pub fn get_url(&self) -> String { | ^^^^^^^ ... 216 | pub fn get_file_info(&self) -> FileInfo { | ^^^^^^^^^^^^^
methods `fetch_api`, `fetch_project`, `fetch_project_versions`, `fetch_project_version`, `get_download_url`, and `resolve_steps` are never used: src/api/sources/hangar/mod.rs#L14
warning: methods `fetch_api`, `fetch_project`, `fetch_project_versions`, `fetch_project_version`, `get_download_url`, and `resolve_steps` are never used --> src/api/sources/hangar/mod.rs:14:18 | 13 | impl<'a> HangarAPI<'a> { | ---------------------- methods in this implementation 14 | pub async fn fetch_api<T: DeserializeOwned>(&self, url: String) -> Result<T> { | ^^^^^^^^^ ... 18 | pub async fn fetch_project(&self, id: &str) -> Result<Project> { | ^^^^^^^^^^^^^ ... 22 | pub async fn fetch_project_versions(&self, id: &str) -> Result<ProjectVersionsResponse> { | ^^^^^^^^^^^^^^^^^^^^^^ ... 26 | pub async fn fetch_project_version(&self, id: &str, version: &str) -> Result<ProjectVersion> { | ^^^^^^^^^^^^^^^^^^^^^ ... 30 | pub fn get_download_url(&self, id: &str, version: &str, platform: &str) -> String { | ^^^^^^^^^^^^^^^^ ... 37 | pub async fn resolve_steps(&self, id: &str, version_id: &str) -> Result<Vec<Step>> { | ^^^^^^^^^^^^^
struct `HangarAPI` is never constructed: src/api/sources/hangar/mod.rs#L11
warning: struct `HangarAPI` is never constructed --> src/api/sources/hangar/mod.rs:11:12 | 11 | pub struct HangarAPI<'a>(pub &'a App); | ^^^^^^^^^
methods `fetch_loaders`, `fetch_versions`, and `fetch_installers` are never used: src/api/sources/fabric/mod.rs#L13
warning: methods `fetch_loaders`, `fetch_versions`, and `fetch_installers` are never used --> src/api/sources/fabric/mod.rs:13:18 | 12 | impl<'a> FabricAPI<'a> { | ---------------------- methods in this implementation 13 | pub async fn fetch_loaders(&self) -> Result<Vec<FabricLoader>> { | ^^^^^^^^^^^^^ ... 17 | pub async fn fetch_versions(&self) -> Result<Vec<FabricVersion>> { | ^^^^^^^^^^^^^^ ... 21 | pub async fn fetch_installers(&self) -> Result<Vec<FabricInstaller>> { | ^^^^^^^^^^^^^^^^
field `0` is never read: src/api/sources/fabric/mod.rs#L10
warning: field `0` is never read --> src/api/sources/fabric/mod.rs:10:26 | 10 | pub struct FabricAPI<'a>(pub &'a App); | --------- ^^^^^^^^^^^ | | | field in this struct | help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 10 | pub struct FabricAPI<'a>(()); | ~~
method `find_url` is never used: src/api/sources/maven/models.rs#L43
warning: method `find_url` is never used --> src/api/sources/maven/models.rs:43:12 | 42 | impl MavenMetadata { | ------------------ method in this implementation 43 | pub fn find_url(&self, url: &str) -> Option<(String, String)> { | ^^^^^^^^
methods `get_text` and `get_text_all` are never used: src/api/sources/maven/models.rs#L4
warning: methods `get_text` and `get_text_all` are never used --> src/api/sources/maven/models.rs:4:8 | 3 | pub trait XMLExt { | ------ methods in this trait 4 | fn get_text(&self, k: &str) -> Result<String>; | ^^^^^^^^ 5 | fn get_text_all(&self, k: &str) -> Vec<String>; | ^^^^^^^^^^^^
methods `find_maven_artifact`, `fetch_metadata`, and `fetch_metadata_url` are never used: src/api/sources/maven/mod.rs#L50
warning: methods `find_maven_artifact`, `fetch_metadata`, and `fetch_metadata_url` are never used --> src/api/sources/maven/mod.rs:50:18 | 49 | impl<'a> MavenAPI<'a> { | --------------------- methods in this implementation 50 | pub async fn find_maven_artifact(&self, url: &str) -> Result<MavenMetadata> { | ^^^^^^^^^^^^^^^^^^^ ... 60 | pub async fn fetch_metadata( | ^^^^^^^^^^^^^^ ... 70 | pub async fn fetch_metadata_url(&self, url: &str) -> Result<MavenMetadata> { | ^^^^^^^^^^^^^^^^^^
function `guess_maven_metadata_url` is never used: src/api/sources/maven/mod.rs#L25
warning: function `guess_maven_metadata_url` is never used --> src/api/sources/maven/mod.rs:25:8 | 25 | pub fn guess_maven_metadata_url(url: &str) -> Result<String> { | ^^^^^^^^^^^^^^^^^^^^^^^^
function `maven_metadata_url` is never used: src/api/sources/maven/mod.rs#L17
warning: function `maven_metadata_url` is never used --> src/api/sources/maven/mod.rs:17:8 | 17 | pub fn maven_metadata_url(url: &str, group_id: &str, artifact_id: &str) -> String { | ^^^^^^^^^^^^^^^^^^
function `maven_artifact_url` is never used: src/api/sources/maven/mod.rs#L10
warning: function `maven_artifact_url` is never used --> src/api/sources/maven/mod.rs:10:8 | 10 | pub fn maven_artifact_url(url: &str, group_id: &str, artifact_id: &str) -> String { | ^^^^^^^^^^^^^^^^^^
field `0` is never read: src/api/sources/maven/mod.rs#L8
warning: field `0` is never read --> src/api/sources/maven/mod.rs:8:25 | 8 | pub struct MavenAPI<'a>(pub &'a App); | -------- ^^^^^^^^^^^ | | | field in this struct | help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 8 | pub struct MavenAPI<'a>(()); | ~~
method `fetch_versions` is never used: src/api/sources/papermc/mod.rs#L21
warning: method `fetch_versions` is never used --> src/api/sources/papermc/mod.rs:21:18 | 13 | impl<'a> PaperMCAPI<'a> { | ----------------------- method in this implementation ... 21 | pub async fn fetch_versions(&self, project: &str) -> Result<Vec<String>> { | ^^^^^^^^^^^^^^
method `paste_log` is never used: src/api/sources/mclogs/mod.rs#L16
warning: method `paste_log` is never used --> src/api/sources/mclogs/mod.rs:16:18 | 15 | impl<'a> MCLogsAPI<'a> { | ---------------------- method in this implementation 16 | pub async fn paste_log(&self, content: &str) -> Result<LogFileMetadata> { | ^^^^^^^^^
function `dollar_repl` is never used: src/api/sources/vanilla/rulematcher.rs#L187
warning: function `dollar_repl` is never used --> src/api/sources/vanilla/rulematcher.rs:187:4 | 187 | fn dollar_repl<F>(input: &str, replacer: F) -> String | ^^^^^^^^^^^
multiple associated items are never used: src/api/sources/vanilla/rulematcher.rs#L20
warning: multiple associated items are never used --> src/api/sources/vanilla/rulematcher.rs:20:12 | 17 | impl PistonRuleMatcher { | ---------------------- associated items in this implementation ... 20 | pub fn new(os_name: String, os_arch: String, os_version: String) -> Self { | ^^^ ... 33 | pub fn empty() -> Self { | ^^^^^ ... 47 | pub fn from_os() -> Self { | ^^^^^^^ ... 71 | pub fn should_download_library(&self, library: &PistonLibrary) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^ ... 79 | pub fn get_native_library(&self, library: &PistonLibrary) -> Option<PistonFile> { | ^^^^^^^^^^^^^^^^^^ ... 93 | pub fn match_rules(&self, rules: &Vec<PistonRule>) -> bool { | ^^^^^^^^^^^ ... 107 | pub fn match_rule(&self, rule: &PistonRule) -> bool { | ^^^^^^^^^^ ... 117 | pub fn match_constraint(&self, constraint: &PistonRuleConstraints) -> bool { | ^^^^^^^^^^^^^^^^ ... 145 | pub fn build_args( | ^^^^^^^^^^ ... 172 | pub fn process_string(&self, map: &HashMap<String, String>, input: &str) -> String { | ^^^^^^^^^^^^^^
struct `PistonRuleMatcher` is never constructed: src/api/sources/vanilla/rulematcher.rs#L12
warning: struct `PistonRuleMatcher` is never constructed --> src/api/sources/vanilla/rulematcher.rs:12:12 | 12 | pub struct PistonRuleMatcher { | ^^^^^^^^^^^^^^^^^
method `find` is never used: src/api/sources/vanilla/manifest.rs#L16
warning: method `find` is never used --> src/api/sources/vanilla/manifest.rs:16:12 | 13 | impl VersionManifest { | -------------------- method in this implementation ... 16 | pub fn find(&self, id: &str) -> Option<VersionIndex> { | ^^^^
methods `get_url` and `get_path` are never used: src/api/sources/vanilla/assets.rs#L21
warning: methods `get_url` and `get_path` are never used --> src/api/sources/vanilla/assets.rs:21:12 | 18 | impl MCAsset { | ------------ methods in this implementation ... 21 | pub fn get_url(&self) -> String { | ^^^^^^^ ... 27 | pub fn get_path(&self) -> String { | ^^^^^^^^
constant `RESOURCES_URL` is never used: src/api/sources/vanilla/assets.rs#L4
warning: constant `RESOURCES_URL` is never used --> src/api/sources/vanilla/assets.rs:4:11 | 4 | pub const RESOURCES_URL: &str = "https://resources.download.minecraft.net"; | ^^^^^^^^^^^^^
method `fetch_latest_mcver` is never used: src/api/sources/vanilla/mod.rs#L49
warning: method `fetch_latest_mcver` is never used --> src/api/sources/vanilla/mod.rs:49:18 | 44 | impl<'a> VanillaAPI<'a> { | ----------------------- method in this implementation ... 49 | pub async fn fetch_latest_mcver(&self) -> Result<String> { | ^^^^^^^^^^^^^^^^^^
methods `fetch_project`, `fetch_versions`, and `version_from_hash` are never used: src/api/sources/modrinth/mod.rs#L24
warning: methods `fetch_project`, `fetch_versions`, and `version_from_hash` are never used --> src/api/sources/modrinth/mod.rs:24:18 | 19 | impl<'a> ModrinthAPI<'a> { | ------------------------ methods in this implementation ... 24 | pub async fn fetch_project(&self, id: &str) -> Result<ModrinthProject> { | ^^^^^^^^^^^^^ ... 32 | pub async fn fetch_versions(&self, id: &str) -> Result<Vec<ModrinthVersion>> { | ^^^^^^^^^^^^^^ ... 104 | pub async fn version_from_hash(&self, hash: &str, algo: &str) -> Result<ModrinthVersion> { | ^^^^^^^^^^^^^^^^^
method `fetch_repo_description` is never used: src/api/sources/github/mod.rs#L73
warning: method `fetch_repo_description` is never used --> src/api/sources/github/mod.rs:73:18 | 27 | impl<'a> GithubAPI<'a> { | ---------------------- method in this implementation ... 73 | pub async fn fetch_repo_description(&self, repo: &str) -> Result<String> { | ^^^^^^^^^^^^^^^^^^^^^^
method `fetch_api` is never used: src/api/sources/curseforge/mod.rs#L13
warning: method `fetch_api` is never used --> src/api/sources/curseforge/mod.rs:13:18 | 12 | impl<'a> CurseforgeAPI<'a> { | -------------------------- method in this implementation 13 | pub async fn fetch_api<T: DeserializeOwned>(&self, url: String) -> Result<T> { | ^^^^^^^^^
struct `CurseforgeAPI` is never constructed: src/api/sources/curseforge/mod.rs#L10
warning: struct `CurseforgeAPI` is never constructed --> src/api/sources/curseforge/mod.rs:10:12 | 10 | pub struct CurseforgeAPI<'a>(pub &'a App); | ^^^^^^^^^^^^^
constant `CURSEFORGE_API_URL` is never used: src/api/sources/curseforge/mod.rs#L8
warning: constant `CURSEFORGE_API_URL` is never used --> src/api/sources/curseforge/mod.rs:8:11 | 8 | pub const CURSEFORGE_API_URL: &str = "https://api.curse.tools/v1/cf"; | ^^^^^^^^^^^^^^^^^^
method `flavor` is never used: src/api/models/server/server_type.rs#L109
warning: method `flavor` is never used --> src/api/models/server/server_type.rs:109:12 | 108 | impl ServerJar { | -------------- method in this implementation 109 | pub fn flavor(&self) -> ServerFlavor { | ^^^^^^
methods `supports_datapacks`, `supports_mods`, and `supports_plugins` are never used: src/api/models/server/server_flavor.rs#L14
warning: methods `supports_datapacks`, `supports_mods`, and `supports_plugins` are never used --> src/api/models/server/server_flavor.rs:14:12 | 13 | impl ServerFlavor { | ----------------- methods in this implementation 14 | pub fn supports_datapacks(&self) -> bool { | ^^^^^^^^^^^^^^^^^^ ... 21 | pub fn supports_mods(&self) -> bool { | ^^^^^^^^^^^^^ ... 28 | pub fn supports_plugins(&self) -> bool { | ^^^^^^^^^^^^^^^^
struct `Lockfile` is never constructed: src/api/models/lockfile/mod.rs#L1
warning: struct `Lockfile` is never constructed --> src/api/models/lockfile/mod.rs:1:12 | 1 | pub struct Lockfile {} | ^^^^^^^^
method `to_path` is never used: src/api/models/addon/addon_target.rs#L44
warning: method `to_path` is never used --> src/api/models/addon/addon_target.rs:44:12 | 18 | impl AddonTarget { | ---------------- method in this implementation ... 44 | pub fn to_path(&self) -> PathBuf { | ^^^^^^^
method `resolve_metadata` is never used: src/api/models/addon/addon_metadata.rs#L50
warning: method `resolve_metadata` is never used --> src/api/models/addon/addon_metadata.rs:50:18 | 49 | impl Addon { | ---------- method in this implementation 50 | pub async fn resolve_metadata(&self, app: &App) -> Result<AddonMetadata> { | ^^^^^^^^^^^^^^^^
methods `into_str` and `icon_url` are never used: src/api/models/addon/addon_metadata.rs#L22
warning: methods `into_str` and `icon_url` are never used --> src/api/models/addon/addon_metadata.rs:22:12 | 21 | impl AddonMetadataSource { | ------------------------ methods in this implementation 22 | pub fn into_str(&self) -> &'static str { | ^^^^^^^^ ... 35 | pub fn icon_url(&self) -> String { | ^^^^^^^^
fields `modrinth`, `cursetools`, `curserinth`, `spiget`, `hangar`, and `mclogs` are never read: src/api/app/options/mod.rs#L20
warning: fields `modrinth`, `cursetools`, `curserinth`, `spiget`, `hangar`, and `mclogs` are never read --> src/api/app/options/mod.rs:20:9 | 16 | pub struct ApiUrls { | ------- fields in this struct ... 20 | pub modrinth: String, | ^^^^^^^^ 21 | #[config(default = "https://curse.tools", env = "API_URL_CURSETOOLS")] 22 | pub cursetools: String, | ^^^^^^^^^^ 23 | #[config(default = "", env = "API_URL_CURSERINTH")] 24 | pub curserinth: String, | ^^^^^^^^^^ 25 | #[config(default = "https://api.spiget.org/v2", env = "API_URL_SPIGET")] 26 | pub spiget: String, | ^^^^^^ 27 | #[config(default = "https://hangar.papermc.io/api/v1", env = "API_URL_HANGAR")] 28 | pub hangar: String, | ^^^^^^ 29 | #[config(default = "https://api.mclo.gs/1", env = "API_URL_MCLOGS")] 30 | pub mclogs: String, | ^^^^^^
field `github_token` is never read: src/api/app/options/mod.rs#L12
warning: field `github_token` is never read --> src/api/app/options/mod.rs:12:9 | 4 | pub struct AppOptions { | ---------- field in this struct ... 12 | pub github_token: Option<String>, | ^^^^^^^^^^^^
method `save_changes` is never used: src/api/app/io.rs#L21
warning: method `save_changes` is never used --> src/api/app/io.rs:21:18 | 10 | impl App { | -------- method in this implementation ... 21 | pub async fn save_changes(&self) -> Result<()> { | ^^^^^^^^^^^^
method `render_markdown` is never used: src/api/app/actions/markdown/mod.rs#L8
warning: method `render_markdown` is never used --> src/api/app/actions/markdown/mod.rs:8:18 | 7 | impl App { | -------- method in this implementation 8 | pub async fn render_markdown(self: Arc<Self>) -> Result<()> { | ^^^^^^^^^^^^^^^
method `action_init_network` is never used: src/api/app/actions/init/mod.rs#L46
warning: method `action_init_network` is never used --> src/api/app/actions/init/mod.rs:46:18 | 10 | impl App { | -------- method in this implementation ... 46 | pub async fn action_init_network(&self) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^
methods `hangar` and `jenkins` are never used: src/api/app/mod.rs#L93
warning: methods `hangar` and `jenkins` are never used --> src/api/app/mod.rs:93:9 | 85 | impl App { | -------- methods in this implementation ... 93 | hangar => HangarAPI, | ^^^^^^ 94 | jenkins => JenkinsAPI, | ^^^^^^^ | = note: this warning originates in the macro `api_methods` (in Nightly builds, run with -Z macro-backtrace for more info)
field `ci` is never read: src/api/app/mod.rs#L32
warning: field `ci` is never read --> src/api/app/mod.rs:32:9 | 26 | pub struct App { | --- field in this struct ... 32 | pub ci: bool, | ^^ | = note: `#[warn(dead_code)]` on by default
unused import: `Digest`: src/api/utils/hashing/curseforge.rs#L1
warning: unused import: `Digest` --> src/api/utils/hashing/curseforge.rs:1:14 | 1 | use digest::{Digest, DynDigest, FixedOutput, FixedOutputReset, OutputSizeUser, Reset, Update}; | ^^^^^^
unused variable: `args`: src/commands/sources/list.rs#L10
warning: unused variable: `args` --> src/commands/sources/list.rs:10:33 | 10 | pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
unused variable: `args`: src/commands/init.rs#L14
warning: unused variable: `args` --> src/commands/init.rs:14:33 | 14 | pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
unused variable: `args`: src/commands/build.rs#L12
warning: unused variable: `args` --> src/commands/build.rs:12:33 | 12 | pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
unused variable: `version`: src/api/models/addon/addon_metadata.rs#L71
warning: unused variable: `version` --> src/api/models/addon/addon_metadata.rs:71:37 | 71 | AddonType::Spigot { id, version } => todo!(), | ^^^^^^^ help: try ignoring the field: `version: _`
unused variable: `id`: src/api/models/addon/addon_metadata.rs#L71
warning: unused variable: `id` --> src/api/models/addon/addon_metadata.rs:71:33 | 71 | AddonType::Spigot { id, version } => todo!(), | ^^ help: try ignoring the field: `id: _`
unused variable: `version`: src/api/models/addon/addon_metadata.rs#L70
warning: unused variable: `version` --> src/api/models/addon/addon_metadata.rs:70:41 | 70 | AddonType::Curseforge { id, version } => todo!(), | ^^^^^^^ help: try ignoring the field: `version: _`
unused variable: `id`: src/api/models/addon/addon_metadata.rs#L70
warning: unused variable: `id` --> src/api/models/addon/addon_metadata.rs:70:37 | 70 | AddonType::Curseforge { id, version } => todo!(), | ^^ help: try ignoring the field: `id: _`
unused variable: `addons`: src/api/app/actions/markdown/mod.rs#L9
warning: unused variable: `addons` --> src/api/app/actions/markdown/mod.rs:9:13 | 9 | let addons = self.collect_addons().await?; | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_addons`
variable does not need to be mutable: src/api/app/actions/init/mod.rs#L51
warning: variable does not need to be mutable --> src/api/app/actions/init/mod.rs:51:13 | 51 | let mut nw = Network { name }; | ----^^ | | | help: remove this `mut`
unused variable: `nw`: src/api/app/actions/init/mod.rs#L51
warning: unused variable: `nw` --> src/api/app/actions/init/mod.rs:51:17 | 51 | let mut nw = Network { name }; | ^^ help: if this is intentional, prefix it with an underscore: `_nw`
variable does not need to be mutable: src/api/app/actions/init/mod.rs#L31
warning: variable does not need to be mutable --> src/api/app/actions/init/mod.rs:31:13 | 31 | let mut server = Server { | ----^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
unused variable: `app`: src/api/models/packwiz/mod.rs#L35
warning: unused variable: `app` --> src/api/models/packwiz/mod.rs:35:36 | 35 | pub async fn into_addon(&self, app: &App, target: AddonTarget) -> Result<Addon> { | ^^^ help: if this is intentional, prefix it with an underscore: `_app`
unused variable: `path`: src/api/models/source.rs#L38
warning: unused variable: `path` --> src/api/models/source.rs:38:30 | 38 | Source::Folder { path } => Ok(vec![]), | ^^^^ help: try ignoring the field: `path: _`
unused variable: `format`: src/api/app/step/cache_check.rs#L48
warning: unused variable: `format` --> src/api/app/step/cache_check.rs:48:30 | 48 | if let Some((format, mut hasher, content)) = hasher { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_format`
unused variable: `app`: src/api/sources/url/mod.rs#L10
warning: unused variable: `app` --> src/api/sources/url/mod.rs:10:5 | 10 | app: &App, | ^^^ help: if this is intentional, prefix it with an underscore: `_app`
unused variable: `artifact`: src/api/models/addon/addon.rs#L25
warning: unused variable: `artifact` --> src/api/models/addon/addon.rs:25:51 | 25 | AddonType::Jenkins { url, job, build, artifact } => todo!(), | ^^^^^^^^ help: try ignoring the field: `artifact: _`
unused variable: `build`: src/api/models/addon/addon.rs#L25
warning: unused variable: `build` --> src/api/models/addon/addon.rs:25:44 | 25 | AddonType::Jenkins { url, job, build, artifact } => todo!(), | ^^^^^ help: try ignoring the field: `build: _`
unused variable: `job`: src/api/models/addon/addon.rs#L25
warning: unused variable: `job` --> src/api/models/addon/addon.rs:25:39 | 25 | AddonType::Jenkins { url, job, build, artifact } => todo!(), | ^^^ help: try ignoring the field: `job: _`
unused variable: `url`: src/api/models/addon/addon.rs#L25
warning: unused variable: `url` --> src/api/models/addon/addon.rs:25:34 | 25 | AddonType::Jenkins { url, job, build, artifact } => todo!(), | ^^^ help: try ignoring the field: `url: _`
unused variable: `version`: src/api/models/addon/addon.rs#L23
warning: unused variable: `version` --> src/api/models/addon/addon.rs:23:37 | 23 | AddonType::Hangar { id, version } => todo!(), | ^^^^^^^ help: try ignoring the field: `version: _`
unused variable: `id`: src/api/models/addon/addon.rs#L23
warning: unused variable: `id` --> src/api/models/addon/addon.rs:23:33 | 23 | AddonType::Hangar { id, version } => todo!(), | ^^ help: try ignoring the field: `id: _`
unused variable: `version`: src/api/models/addon/addon.rs#L22
warning: unused variable: `version` --> src/api/models/addon/addon.rs:22:37 | 22 | AddonType::Spigot { id, version } => todo!(), | ^^^^^^^ help: try ignoring the field: `version: _`
unused variable: `id`: src/api/models/addon/addon.rs#L22
warning: unused variable: `id` --> src/api/models/addon/addon.rs:22:33 | 22 | AddonType::Spigot { id, version } => todo!(), | ^^ help: try ignoring the field: `id: _`
unused variable: `version`: src/api/models/addon/addon.rs#L21
warning: unused variable: `version` --> src/api/models/addon/addon.rs:21:41 | 21 | AddonType::Curseforge { id, version } => Ok(vec![]), | ^^^^^^^ help: try ignoring the field: `version: _`
unused variable: `id`: src/api/models/addon/addon.rs#L21
warning: unused variable: `id` --> src/api/models/addon/addon.rs:21:37 | 21 | AddonType::Curseforge { id, version } => Ok(vec![]), | ^^ help: try ignoring the field: `id: _`
unused variable: `env`: src/api/sources/fabric/mod.rs#L30
warning: unused variable: `env` --> src/api/sources/fabric/mod.rs:30:9 | 30 | env: &Environment, | ^^^ help: if this is intentional, prefix it with an underscore: `_env`
unused variable: `args`: src/api/models/server/server_type.rs#L132
warning: unused variable: `args` --> src/api/models/server/server_type.rs:132:48 | 132 | ServerType::BuildTools { software, args } => todo!(), | ^^^^ help: try ignoring the field: `args: _`
unused variable: `software`: src/api/models/server/server_type.rs#L132
warning: unused variable: `software` --> src/api/models/server/server_type.rs:132:38 | 132 | ServerType::BuildTools { software, args } => todo!(), | ^^^^^^^^ help: try ignoring the field: `software: _`
unused variable: `loader`: src/api/models/server/server_type.rs#L131
warning: unused variable: `loader` --> src/api/models/server/server_type.rs:131:33 | 131 | ServerType::Forge { loader } => todo!(), | ^^^^^^ help: try ignoring the field: `loader: _`
unused variable: `loader`: src/api/models/server/server_type.rs#L130
warning: unused variable: `loader` --> src/api/models/server/server_type.rs:130:36 | 130 | ServerType::NeoForge { loader } => todo!(), | ^^^^^^ help: try ignoring the field: `loader: _`
unused variable: `installer`: src/api/models/server/server_type.rs#L129
warning: unused variable: `installer` --> src/api/models/server/server_type.rs:129:41 | 129 | ServerType::Quilt { loader, installer } => todo!(), | ^^^^^^^^^ help: try ignoring the field: `installer: _`
unused variable: `loader`: src/api/models/server/server_type.rs#L129
warning: unused variable: `loader` --> src/api/models/server/server_type.rs:129:33 | 129 | ServerType::Quilt { loader, installer } => todo!(), | ^^^^^^ help: try ignoring the field: `loader: _`
unused variable: `build`: src/api/models/server/server_type.rs#L127
warning: unused variable: `build` --> src/api/models/server/server_type.rs:127:34 | 127 | ServerType::Purpur { build } => todo!(), | ^^^^^ help: try ignoring the field: `build: _` | = note: `#[warn(unused_variables)]` on by default
unused import: `path::Path`: src/commands/init.rs#L1
warning: unused import: `path::Path` --> src/commands/init.rs:1:11 | 1 | use std::{path::Path, sync::Arc}; | ^^^^^^^^^^
binding's name is too similar to existing binding: src/api/utils/pathdiff.rs#L59
warning: binding's name is too similar to existing binding --> src/api/utils/pathdiff.rs:59:17 | 59 | let mut itb = base.components(); | ^^^ | note: existing binding defined here --> src/api/utils/pathdiff.rs:58:17 | 58 | let mut ita = path.components(); | ^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names
unused import: `DynDigest`: src/api/utils/hashing/curseforge.rs#L1
warning: unused import: `DynDigest` --> src/api/utils/hashing/curseforge.rs:1:22 | 1 | use digest::{Digest, DynDigest, FixedOutput, FixedOutputReset, OutputSizeUser, Reset, Update}; | ^^^^^^^^^
unused imports: `Read`, `Seek`: src/api/utils/accessor.rs#L2
warning: unused imports: `Read`, `Seek` --> src/api/utils/accessor.rs:2:10 | 2 | io::{Read, Seek}, | ^^^^ ^^^^
glob import doesn't reexport anything with visibility `pub` because no imported item is public enough: src/api/tools/java/mod.rs#L8
warning: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough --> src/api/tools/java/mod.rs:8:9 | 8 | pub use find::*; | ^^^^^^^ | note: the most public imported item is `pub(self)` --> src/api/tools/java/mod.rs:8:9 | 8 | pub use find::*; | ^^^^^^^ = help: reduce the glob import's visibility or increase visibility of imported items
unused import: `anyhow::Result`: src/api/sources/hangar/models.rs#L3
warning: unused import: `anyhow::Result` --> src/api/sources/hangar/models.rs:3:5 | 3 | use anyhow::Result; | ^^^^^^^^^^^^^^
unused imports: `assets::*`, `rulematcher::*`: src/api/sources/vanilla/mod.rs#L17
warning: unused imports: `assets::*`, `rulematcher::*` --> src/api/sources/vanilla/mod.rs:17:16 | 17 | pub use self::{assets::*, manifest::*, rulematcher::*, version::*}; | ^^^^^^^^^ ^^^^^^^^^^^^^^
unused import: `Context`: src/api/sources/github/mod.rs#L1
warning: unused import: `Context` --> src/api/sources/github/mod.rs:1:22 | 1 | use anyhow::{anyhow, Context, Result}; | ^^^^^^^
unused import: `models::*`: src/api/sources/curseforge/mod.rs#L3
warning: unused import: `models::*` --> src/api/sources/curseforge/mod.rs:3:9 | 3 | pub use models::*; | ^^^^^^^^^
unused import: `std::path::Path`: src/api/models/packwiz/mod.rs#L4
warning: unused import: `std::path::Path` --> src/api/models/packwiz/mod.rs:4:5 | 4 | use std::path::Path; | ^^^^^^^^^^^^^^^
unused import: `Environment`: src/api/models/mrpack/mod.rs#L13
warning: unused import: `Environment` --> src/api/models/mrpack/mod.rs:13:44 | 13 | use super::{Addon, AddonTarget, AddonType, Environment}; | ^^^^^^^^^^^
unused import: `models::Environment`: src/api/models/mrpack/mrpack_file.rs#L5
warning: unused import: `models::Environment` --> src/api/models/mrpack/mrpack_file.rs:5:18 | 5 | use crate::api::{models::Environment, utils::hashing::HashFormat}; | ^^^^^^^^^^^^^^^^^^^
unused import: `addon_metadata::*`: src/api/models/addon/mod.rs#L8
warning: unused import: `addon_metadata::*` --> src/api/models/addon/mod.rs:8:9 | 8 | pub use addon_metadata::*; | ^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
redundant else block: src/api/app/step/cache_check.rs#L63
warning: redundant else block --> src/api/app/step/cache_check.rs:63:28 | 63 | } else { | ____________________________^ 64 | | // hash mismatch 65 | | // TODO: print warning 66 | | println!("WARNING Hash mismatch: {}", metadata.filename); 67 | | tokio::fs::remove_file(&output_path).await?; 68 | | } | |_____________________^ | = help: remove the `else` block and move the contents out = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else = note: `-W clippy::redundant-else` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_else)]`
binding's name is too similar to existing binding: src/api/app/http.rs#L20
warning: binding's name is too similar to existing binding --> src/api/app/http.rs:20:13 | 20 | let res = req.send().await?.error_for_status()?; | ^^^ | note: existing binding defined here --> src/api/app/http.rs:16:13 | 16 | let req = self.http_client.get(url.as_str()); | ^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names = note: `-W clippy::similar-names` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::similar_names)]`
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
4.76 MB
mcman-windows-latest Expired
7.55 MB