debugging github workflow 2 #67
clippy
22 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 22 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.70.0 (90c541806 2023-05-31)
- cargo 1.70.0 (ec8a8a0ca 2023-04-25)
- clippy 0.1.70 (90c5418 2023-05-31)
Annotations
Check warning on line 123 in dashboard/src-tauri/src/main.rs
github-actions / clippy
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> dashboard/src-tauri/src/main.rs:117:34
|
117 | .on_window_event(|event| match event.event() {
| __________________________________^
118 | | tauri::WindowEvent::CloseRequested { api, .. } => {
119 | | event.window().hide().unwrap();
120 | | api.prevent_close();
121 | | }
122 | | _ => {}
123 | | })
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try this
|
117 ~ .on_window_event(|event| if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() {
118 + event.window().hide().unwrap();
119 + api.prevent_close();
120 ~ })
|
Check warning on line 93 in core/src/handlers/instance_setup_configs.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> core/src/handlers/instance_setup_configs.rs:91:5
|
91 | / return Ok(Json(SetupManifest {
92 | | setting_sections: Default::default(),
93 | | }));
| |_______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
Check warning on line 130 in core/src/extension/mod.rs
github-actions / clippy
called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
--> core/src/extension/mod.rs:124:20
|
124 | let username = _url
| ____________________^
125 | | .path_segments()
126 | | .ok_or_else(|| {
127 | | error!("Failed to get path segments");
128 | | FetchExtensionManifestError::Other(500, "Failed to get path segments".to_string())
129 | | })?
130 | | .nth(0)
| |_______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
= note: `#[warn(clippy::iter_nth_zero)]` on by default
help: try calling `.next()` instead of `.nth(0)`
|
124 ~ let username = _url
125 + .path_segments()
126 + .ok_or_else(|| {
127 + error!("Failed to get path segments");
128 + FetchExtensionManifestError::Other(500, "Failed to get path segments".to_string())
129 + })?.next()
|
Check warning on line 272 in core/src/macro_executor.rs
github-actions / clippy
associated function `add_default_permissions` is never used
warning: associated function `add_default_permissions` is never used
--> core/src/macro_executor.rs:272:8
|
236 | impl MacroExecutor {
| ------------------ associated function in this implementation
...
272 | fn add_default_permissions(
| ^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 51 in core/src/extension/git/mod.rs
github-actions / clippy
methods `get_current_commit`, `fetch`, and `get_latest_commit` are never used
warning: methods `get_current_commit`, `fetch`, and `get_latest_commit` are never used
--> core/src/extension/git/mod.rs:51:18
|
12 | impl GitClient {
| -------------- methods in this implementation
...
51 | pub async fn get_current_commit(&self) -> Result<String, Error> {
| ^^^^^^^^^^^^^^^^^^
...
66 | pub async fn fetch(&self) -> Result<(), Error> {
| ^^^^^
...
79 | pub async fn get_latest_commit(&self) -> Result<String, Error> {
| ^^^^^^^^^^^^^^^^^
Check warning on line 198 in core/src/extension/mod.rs
github-actions / clippy
fields `extension_path` and `macro_path` are never read
warning: fields `extension_path` and `macro_path` are never read
--> core/src/extension/mod.rs:198:5
|
197 | pub struct ExtensionManager {
| ---------------- fields in this struct
198 | extension_path: PathBuf,
| ^^^^^^^^^^^^^^
199 | atom_path: PathBuf,
200 | macro_path: PathBuf,
| ^^^^^^^^^^
Check warning on line 40 in core/src/docker_bridge/mod.rs
github-actions / clippy
function `extract_container_id` is never used
warning: function `extract_container_id` is never used
--> core/src/docker_bridge/mod.rs:40:4
|
40 | fn extract_container_id(event: &EventMessage) -> Option<String> {
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 311 in core/src/macro_executor.rs
github-actions / clippy
unused variable: `permissions`
warning: unused variable: `permissions`
--> core/src/macro_executor.rs:311:9
|
311 | permissions: Option<PermissionsOptions>,
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_permissions`
Check warning on line 75 in core/src/handlers/extension.rs
github-actions / clippy
unused variable: `state`
warning: unused variable: `state`
--> core/src/handlers/extension.rs:75:26
|
75 | axum::extract::State(state): axum::extract::State<AppState>,
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 15 in core/src/handlers/extension.rs
github-actions / clippy
unused imports: `ErrorKind`, `auth::user::UserAction`
warning: unused imports: `ErrorKind`, `auth::user::UserAction`
--> core/src/handlers/extension.rs:15:5
|
15 | auth::user::UserAction,
| ^^^^^^^^^^^^^^^^^^^^^^
16 | error::{Error, ErrorKind},
| ^^^^^^^^^
Check warning on line 12 in core/src/handlers/extension.rs
github-actions / clippy
unused import: `tracing::error`
warning: unused import: `tracing::error`
--> core/src/handlers/extension.rs:12:5
|
12 | use tracing::error;
| ^^^^^^^^^^^^^^
Check warning on line 11 in core/src/handlers/extension.rs
github-actions / clippy
unused import: `serde_json::Value`
warning: unused import: `serde_json::Value`
--> core/src/handlers/extension.rs:11:5
|
11 | use serde_json::Value;
| ^^^^^^^^^^^^^^^^^
Check warning on line 10 in core/src/handlers/extension.rs
github-actions / clippy
unused import: `eyre`
warning: unused import: `eyre`
--> core/src/handlers/extension.rs:10:24
|
10 | use color_eyre::eyre::{eyre, Context};
| ^^^^
Check warning on line 8 in core/src/handlers/extension.rs
github-actions / clippy
unused import: `axum_auth::AuthBearer`
warning: unused import: `axum_auth::AuthBearer`
--> core/src/handlers/extension.rs:8:5
|
8 | use axum_auth::AuthBearer;
| ^^^^^^^^^^^^^^^^^^^^^
Check warning on line 4 in core/src/handlers/extension.rs
github-actions / clippy
unused import: `extract::Path`
warning: unused import: `extract::Path`
--> core/src/handlers/extension.rs:4:5
|
4 | extract::Path,
| ^^^^^^^^^^^^^
Check warning on line 1 in core/src/handlers/extension.rs
github-actions / clippy
unused import: `std::num::NonZeroU16`
warning: unused import: `std::num::NonZeroU16`
--> core/src/handlers/extension.rs:1:5
|
1 | use std::num::NonZeroU16;
| ^^^^^^^^^^^^^^^^^^^^
Check warning on line 3 in core/src/handlers/instance_setup_configs.rs
github-actions / clippy
unused import: `crate::implementations::generic`
warning: unused import: `crate::implementations::generic`
--> core/src/handlers/instance_setup_configs.rs:3:5
|
3 | use crate::implementations::generic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 22 in core/src/handlers/instance.rs
github-actions / clippy
unused import: `crate::traits::t_configurable::Game::Generic`
warning: unused import: `crate::traits::t_configurable::Game::Generic`
--> core/src/handlers/instance.rs:22:5
|
22 | use crate::traits::t_configurable::Game::Generic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 7 in core/src/handlers/instance.rs
github-actions / clippy
unused import: `bollard::Docker`
warning: unused import: `bollard::Docker`
--> core/src/handlers/instance.rs:7:5
|
7 | use bollard::Docker;
| ^^^^^^^^^^^^^^^
Check warning on line 6 in core/src/handlers/instance.rs
github-actions / clippy
unused import: `bollard::container::ListContainersOptions`
warning: unused import: `bollard::container::ListContainersOptions`
--> core/src/handlers/instance.rs:6:5
|
6 | use bollard::container::ListContainersOptions;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 3 in core/src/extension/git/mod.rs
github-actions / clippy
unused import: `process::Stdio`
warning: unused import: `process::Stdio`
--> core/src/extension/git/mod.rs:3:5
|
3 | process::Stdio,
| ^^^^^^^^^^^^^^
Check warning on line 3 in core/src/extension/mod.rs
github-actions / clippy
unused import: `axum::Json`
warning: unused import: `axum::Json`
--> core/src/extension/mod.rs:3:5
|
3 | use axum::Json;
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default