clippy
65 errors, 203 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 65 |
Warning | 203 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.1 (3f5fd8dd4 2024-08-06)
- cargo 1.80.1 (376290515 2024-07-16)
- clippy 0.1.80 (3f5fd8d 2024-08-06)
Annotations
Check warning on line 16 in src/commands/export/packwiz.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/commands/export/packwiz.rs:12:1
|
12 | / pub async fn run(app: Arc<App>, args: Args) -> Result<()> {
13 | |
14 | |
15 | | Ok(())
16 | | }
| |_^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
Check warning on line 16 in src/commands/export/mrpack.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/commands/export/mrpack.rs:12:1
|
12 | / pub async fn run(app: Arc<App>, args: Args) -> Result<()> {
13 | |
14 | |
15 | | Ok(())
16 | | }
| |_^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
Check warning on line 16 in src/commands/update.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/commands/update.rs:12:1
|
12 | / pub async fn run(app: Arc<App>, args: Args) -> Result<()> {
13 | | println!("{:#?}", git::version_check());
14 | |
15 | | Ok(())
16 | | }
| |_^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
Check warning on line 125 in src/commands/migrate.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/commands/migrate.rs:38:1
|
38 | / pub async fn migrate_server() -> Result<()> {
39 | | let legacy_server = read_toml::<LegacyServer>(&PathBuf::from("./server.toml"))
40 | | .with_context(|| "Reading server.toml")?;
... |
124 | | Ok(())
125 | | }
| |_^
|
= 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 14 in src/commands/markdown/print.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/commands/markdown/print.rs:10:1
|
10 | / pub async fn run(app: Arc<App>, args: Args) -> Result<()> {
11 | | todo!();
12 | |
13 | | Ok(())
14 | | }
| |_^
|
= 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 88 in src/api/ws/mod.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/ws/mod.rs:84:5
|
84 | / pub async fn handle_event(self: Arc<Self>, event: MsgIn) -> Result<()> {
85 | |
86 | |
87 | | Ok(())
88 | | }
| |_____^
|
= 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 68 in src/api/utils/zip.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/utils/zip.rs:45:1
|
45 | / pub async fn zip<T: Write + Seek>(writer: T, folder: &Path) -> Result<()> {
46 | | let mut archive = ZipWriter::new(writer);
47 | |
48 | | archive.set_comment(format!("generated by mcman/{APP_VERSION}"));
... |
67 | | Ok(())
68 | | }
| |_^
|
= 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 42 in src/api/utils/zip.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/utils/zip.rs:12:1
|
12 | / pub async fn unzip<T: Read + Seek>(reader: T, to: &Path, prefix: Option<String>) -> Result<()> {
13 | | let mut archive = ZipArchive::new(reader)?;
14 | |
15 | | let mut files = archive.file_names().map(ToOwned::to_owned).collect::<Vec<_>>();
... |
41 | | Ok(())
42 | | }
| |_^
|
= 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 53 in src/api/utils/accessor.rs
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:43:5
|
43 | / pub async fn dir(&self) -> Result<Vec<String>> {
44 | | match self {
45 | | Accessor::ZipLocal((_, zip)) => Ok(zip.file_names().map(ToOwned::to_owned).collect()),
46 | | Accessor::Local(path) => Ok(path
... |
52 | | }
53 | | }
| |_____^
|
= 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 93 in src/api/sources/quilt/mod.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/sources/quilt/mod.rs:59:5
|
59 | / pub async fn resolve_steps_build(
60 | | &self,
61 | | jar_name: &str,
62 | | mc_version: &str,
... |
92 | | ])
93 | | }
| |_____^
|
= 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 93 in src/api/sources/buildtools/mod.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/sources/buildtools/mod.rs:54:1
|
54 | / pub async fn resolve_compile_steps(
55 | | _app: &App,
56 | | jar_name: &str,
57 | | craftbukkit: bool,
... |
92 | | ])
93 | | }
| |_^
|
= 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 36 in src/api/sources/buildtools/mod.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/sources/buildtools/mod.rs:29:1
|
29 | / pub async fn resolve_remove_steps(
30 | | _app: &App,
31 | | _craftbukkit: bool,
32 | | _custom_args: &Vec<String>,
... |
35 | | Ok(vec![Step::RemoveFile(FileMeta::filename(String::from("server.jar")))])
36 | | }
| |_^
|
= 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 75 in src/api/sources/spigot/mod.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/sources/spigot/mod.rs:71:5
|
71 | / pub async fn resolve_remove_steps(&self, id: &str, version: &str) -> Result<Vec<Step>> {
72 | | Ok(vec![
73 | | Step::RemoveFile(FileMeta::filename(format!("spigot-{}-{}.jar", resource_id(id), version)))
74 | | ])
75 | | }
| |_____^
|
= 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 69 in src/api/sources/spigot/mod.rs
github-actions / clippy
unused `async` for function with no await statements
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
Check warning on line 65 in src/api/sources/fabric/mod.rs
github-actions / clippy
unused `async` for function with no await statements
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,
... |
64 | | Ok(steps)
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
Check warning on line 117 in src/api/sources/maven/mod.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/sources/maven/mod.rs:83:5
|
83 | / pub async fn resolve(
84 | | &self,
85 | | url: &str,
86 | | group_id: &str,
... |
116 | | Ok((download_url, metadata))
117 | | }
| |_____^
|
= 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 102 in src/api/models/packwiz/mod.rs
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:72:5
|
72 | / pub async fn into_addon(&self, app: &App, target: AddonTarget) -> Result<Addon> {
73 | | let addon_type = if let Some(update) = &self.update {
74 | | match update {
75 | | PackwizModUpdate::Modrinth { mod_id, version } => AddonType::Modrinth {
... |
101 | | Ok(addon)
102 | | }
| |_____^
|
= 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 53 in src/api/models/packwiz/mod.rs
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:51:5
|
51 | / pub async fn from_steps(steps: &Vec<Step>) -> Self {
52 | | todo!()
53 | | }
| |_____^
|
= 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 47 in src/api/models/mrpack/mod.rs
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:35:5
|
35 | / pub async fn into_addon(&self) -> Result<Addon> {
36 | | Ok(Addon {
37 | | environment: self.env.as_ref().map(|e| e.clone().into()),
38 | | addon_type: AddonType::Url {
... |
46 | | })
47 | | }
| |_____^
|
= 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 83 in src/api/app/actions/build/bootstrap.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/api/app/actions/build/bootstrap.rs:66:5
|
66 | / pub async fn should_bootstrap_file(&self, file: &Path) -> bool {
67 | | let ext = file.extension().unwrap_or_default().to_str().unwrap_or_default();
68 | |
69 | | let bootstrap_exts = [
... |
82 | | bootstrap_exts.contains(&ext)
83 | | }
| |_____^
|
= 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 71 in src/main.rs
github-actions / clippy
useless conversion to the same type: `std::path::PathBuf`
error: useless conversion to the same type: `std::path::PathBuf`
--> src/main.rs:71:17
|
71 | base.into(),
| ^^^^^^^^^^^ help: consider removing `.into()`: `base`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check failure on line 120 in src/commands/migrate.rs
github-actions / clippy
useless use of `format!`
error: useless use of `format!`
--> src/commands/migrate.rs:120:26
|
120 | .with_context(|| format!("Writing server.toml"))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Writing server.toml".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
Check failure on line 72 in src/commands/migrate.rs
github-actions / clippy
useless use of `format!`
error: useless use of `format!`
--> src/commands/migrate.rs:72:26
|
72 | .with_context(|| format!("Writing addons.toml"))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Writing addons.toml".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
Check warning on line 71 in src/commands/init.rs
github-actions / clippy
called `map(<f>).unwrap_or_else(<g>)` on an `Option` value
warning: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value
--> src/commands/init.rs:71:24
|
71 | let name: String = args.name.map(Ok).unwrap_or_else(|| cliclack::input("Name of the network?").interact())?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.name.map_or_else(|| cliclack::input("Name of the network?").interact(), Ok)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
Check warning on line 46 in src/commands/init.rs
github-actions / clippy
called `map(<f>).unwrap_or_else(<g>)` on an `Option` value
warning: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value
--> src/commands/init.rs:46:24
|
46 | let name: String = args.name.map(Ok).unwrap_or_else(|| cliclack::input("Name of the server?").interact())?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.name.map_or_else(|| cliclack::input("Name of the server?").interact(), Ok)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or