Merge pull request #386 from Lodestone-Team/extension #94
dev.yml
on: push
workspace-check
/
workspace-check
6m 44s
Matrix: core-cargo-test / core-cargo-test
Annotations
3 errors and 56 warnings
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
core-cargo-test / core-cargo-test (windows-latest, x86_64-pc-windows-msvc)
The job was canceled because "ubuntu-latest_x86_64-unkn" failed.
|
core-cargo-test / core-cargo-test (windows-latest, x86_64-pc-windows-msvc)
The operation was canceled.
|
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (ubuntu-latest, x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (windows-latest, x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (windows-latest, x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (windows-latest, x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
core-cargo-test / core-cargo-test (windows-latest, x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
dashboard/src-tauri/src/main.rs#L117
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 ~ })
|
|
unneeded `return` statement:
core/src/handlers/instance_setup_configs.rs#L91
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`
|
called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent:
core/src/extension/mod.rs#L124
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()
|
|
methods `get_current_commit`, `fetch`, and `get_latest_commit` are never used:
core/src/extension/git/mod.rs#L39
warning: methods `get_current_commit`, `fetch`, and `get_latest_commit` are never used
--> core/src/extension/git/mod.rs:39:18
|
9 | impl GitClient {
| -------------- methods in this implementation
...
39 | pub async fn get_current_commit(&self) -> Result<String, Error> {
| ^^^^^^^^^^^^^^^^^^
...
54 | pub async fn fetch(&self) -> Result<(), Error> {
| ^^^^^
...
67 | pub async fn get_latest_commit(&self) -> Result<String, Error> {
| ^^^^^^^^^^^^^^^^^
|
fields `extension_path` and `macro_path` are never read:
core/src/extension/mod.rs#L198
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,
| ^^^^^^^^^^
|
function `extract_container_id` is never used:
core/src/docker_bridge/mod.rs#L40
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
|
unused variable: `state`:
core/src/handlers/extension.rs#L75
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
|
unused imports: `ErrorKind`, `auth::user::UserAction`:
core/src/handlers/extension.rs#L15
warning: unused imports: `ErrorKind`, `auth::user::UserAction`
--> core/src/handlers/extension.rs:15:5
|
15 | auth::user::UserAction,
| ^^^^^^^^^^^^^^^^^^^^^^
16 | error::{Error, ErrorKind},
| ^^^^^^^^^
|
unused import: `tracing::error`:
core/src/handlers/extension.rs#L12
warning: unused import: `tracing::error`
--> core/src/handlers/extension.rs:12:5
|
12 | use tracing::error;
| ^^^^^^^^^^^^^^
|
unused import: `serde_json::Value`:
core/src/handlers/extension.rs#L11
warning: unused import: `serde_json::Value`
--> core/src/handlers/extension.rs:11:5
|
11 | use serde_json::Value;
| ^^^^^^^^^^^^^^^^^
|
unused import: `eyre`:
core/src/handlers/extension.rs#L10
warning: unused import: `eyre`
--> core/src/handlers/extension.rs:10:24
|
10 | use color_eyre::eyre::{eyre, Context};
| ^^^^
|
unused import: `axum_auth::AuthBearer`:
core/src/handlers/extension.rs#L8
warning: unused import: `axum_auth::AuthBearer`
--> core/src/handlers/extension.rs:8:5
|
8 | use axum_auth::AuthBearer;
| ^^^^^^^^^^^^^^^^^^^^^
|
unused import: `extract::Path`:
core/src/handlers/extension.rs#L4
warning: unused import: `extract::Path`
--> core/src/handlers/extension.rs:4:5
|
4 | extract::Path,
| ^^^^^^^^^^^^^
|
unused import: `std::num::NonZeroU16`:
core/src/handlers/extension.rs#L1
warning: unused import: `std::num::NonZeroU16`
--> core/src/handlers/extension.rs:1:5
|
1 | use std::num::NonZeroU16;
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::implementations::generic`:
core/src/handlers/instance_setup_configs.rs#L3
warning: unused import: `crate::implementations::generic`
--> core/src/handlers/instance_setup_configs.rs:3:5
|
3 | use crate::implementations::generic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::traits::t_configurable::Game::Generic`:
core/src/handlers/instance.rs#L22
warning: unused import: `crate::traits::t_configurable::Game::Generic`
--> core/src/handlers/instance.rs:22:5
|
22 | use crate::traits::t_configurable::Game::Generic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `bollard::Docker`:
core/src/handlers/instance.rs#L7
warning: unused import: `bollard::Docker`
--> core/src/handlers/instance.rs:7:5
|
7 | use bollard::Docker;
| ^^^^^^^^^^^^^^^
|
unused import: `bollard::container::ListContainersOptions`:
core/src/handlers/instance.rs#L6
warning: unused import: `bollard::container::ListContainersOptions`
--> core/src/handlers/instance.rs:6:5
|
6 | use bollard::container::ListContainersOptions;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `process::Stdio`:
core/src/extension/git/mod.rs#L1
warning: unused import: `process::Stdio`
--> core/src/extension/git/mod.rs:1:34
|
1 | use std::{path::{PathBuf, Path}, process::Stdio};
| ^^^^^^^^^^^^^^
|
unused import: `axum::Json`:
core/src/extension/mod.rs#L3
warning: unused import: `axum::Json`
--> core/src/extension/mod.rs:3:5
|
3 | use axum::Json;
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
workspace-check / workspace-check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions-rs/toolchain@v1, 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/.
|
workspace-check / workspace-check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, 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/
|
workspace-check / workspace-check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
workspace-check / workspace-check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
workspace-check / workspace-check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
workspace-check / workspace-check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
dashboard/src-tauri/src/main.rs#L117
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 ~ })
|
|
unneeded `return` statement:
core/src/handlers/instance_setup_configs.rs#L91
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`
|
called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent:
core/src/extension/mod.rs#L124
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()
|
|
methods `get_current_commit`, `fetch`, and `get_latest_commit` are never used:
core/src/extension/git/mod.rs#L39
warning: methods `get_current_commit`, `fetch`, and `get_latest_commit` are never used
--> core/src/extension/git/mod.rs:39:18
|
9 | impl GitClient {
| -------------- methods in this implementation
...
39 | pub async fn get_current_commit(&self) -> Result<String, Error> {
| ^^^^^^^^^^^^^^^^^^
...
54 | pub async fn fetch(&self) -> Result<(), Error> {
| ^^^^^
...
67 | pub async fn get_latest_commit(&self) -> Result<String, Error> {
| ^^^^^^^^^^^^^^^^^
|
fields `extension_path` and `macro_path` are never read:
core/src/extension/mod.rs#L198
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,
| ^^^^^^^^^^
|
function `extract_container_id` is never used:
core/src/docker_bridge/mod.rs#L40
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
|
unused variable: `state`:
core/src/handlers/extension.rs#L75
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
|
unused imports: `ErrorKind`, `auth::user::UserAction`:
core/src/handlers/extension.rs#L15
warning: unused imports: `ErrorKind`, `auth::user::UserAction`
--> core/src/handlers/extension.rs:15:5
|
15 | auth::user::UserAction,
| ^^^^^^^^^^^^^^^^^^^^^^
16 | error::{Error, ErrorKind},
| ^^^^^^^^^
|
unused import: `tracing::error`:
core/src/handlers/extension.rs#L12
warning: unused import: `tracing::error`
--> core/src/handlers/extension.rs:12:5
|
12 | use tracing::error;
| ^^^^^^^^^^^^^^
|
unused import: `serde_json::Value`:
core/src/handlers/extension.rs#L11
warning: unused import: `serde_json::Value`
--> core/src/handlers/extension.rs:11:5
|
11 | use serde_json::Value;
| ^^^^^^^^^^^^^^^^^
|
unused import: `eyre`:
core/src/handlers/extension.rs#L10
warning: unused import: `eyre`
--> core/src/handlers/extension.rs:10:24
|
10 | use color_eyre::eyre::{eyre, Context};
| ^^^^
|
unused import: `axum_auth::AuthBearer`:
core/src/handlers/extension.rs#L8
warning: unused import: `axum_auth::AuthBearer`
--> core/src/handlers/extension.rs:8:5
|
8 | use axum_auth::AuthBearer;
| ^^^^^^^^^^^^^^^^^^^^^
|
unused import: `extract::Path`:
core/src/handlers/extension.rs#L4
warning: unused import: `extract::Path`
--> core/src/handlers/extension.rs:4:5
|
4 | extract::Path,
| ^^^^^^^^^^^^^
|
unused import: `std::num::NonZeroU16`:
core/src/handlers/extension.rs#L1
warning: unused import: `std::num::NonZeroU16`
--> core/src/handlers/extension.rs:1:5
|
1 | use std::num::NonZeroU16;
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::implementations::generic`:
core/src/handlers/instance_setup_configs.rs#L3
warning: unused import: `crate::implementations::generic`
--> core/src/handlers/instance_setup_configs.rs:3:5
|
3 | use crate::implementations::generic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::traits::t_configurable::Game::Generic`:
core/src/handlers/instance.rs#L22
warning: unused import: `crate::traits::t_configurable::Game::Generic`
--> core/src/handlers/instance.rs:22:5
|
22 | use crate::traits::t_configurable::Game::Generic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `bollard::Docker`:
core/src/handlers/instance.rs#L7
warning: unused import: `bollard::Docker`
--> core/src/handlers/instance.rs:7:5
|
7 | use bollard::Docker;
| ^^^^^^^^^^^^^^^
|
unused import: `bollard::container::ListContainersOptions`:
core/src/handlers/instance.rs#L6
warning: unused import: `bollard::container::ListContainersOptions`
--> core/src/handlers/instance.rs:6:5
|
6 | use bollard::container::ListContainersOptions;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `process::Stdio`:
core/src/extension/git/mod.rs#L1
warning: unused import: `process::Stdio`
--> core/src/extension/git/mod.rs:1:34
|
1 | use std::{path::{PathBuf, Path}, process::Stdio};
| ^^^^^^^^^^^^^^
|
unused import: `axum::Json`:
core/src/extension/mod.rs#L3
warning: unused import: `axum::Json`
--> core/src/extension/mod.rs:3:5
|
3 | use axum::Json;
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|