macro config parsing in core #50
clippy
17 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 17 |
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 101 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:95:34
|
95 | .on_window_event(|event| match event.event() {
| __________________________________^
96 | | tauri::WindowEvent::CloseRequested { api, .. } => {
97 | | event.window().hide().unwrap();
98 | | api.prevent_close();
99 | | }
100 | | _ => {}
101 | | })
| |_________^
|
= 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
|
95 ~ .on_window_event(|event| if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() {
96 + event.window().hide().unwrap();
97 + api.prevent_close();
98 ~ })
|
Check warning on line 369 in core/src/traits/t_configurable/manifest.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> core/src/traits/t_configurable/manifest.rs:360:5
|
360 | / pub fn new_value_with_type(
361 | | setting_id: String,
362 | | name: String,
363 | | description: String,
... |
368 | | is_mutable: bool,
369 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 341 in core/src/traits/t_configurable/manifest.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> core/src/traits/t_configurable/manifest.rs:332:5
|
332 | / pub fn new_optional_value(
333 | | setting_id: String,
334 | | name: String,
335 | | description: String,
... |
340 | | is_mutable: bool,
341 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 1076 in core/src/macro_executor.rs
github-actions / clippy
unnecessary closure used to substitute value for `Option::None`
warning: unnecessary closure used to substitute value for `Option::None`
--> core/src/macro_executor.rs:1062:9
|
1062 | / deno_runtime::errors::get_error_class_name(e)
1063 | | .or_else(|| {
1064 | | e.downcast_ref::<ImportMapError>()
1065 | | .map(get_import_map_error_class)
... |
1075 | | })
1076 | | .unwrap_or_else(|| "Error")
| |______________-------------------------^
| |
| help: use `unwrap_or(..)` instead: `unwrap_or("Error")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
Check warning on line 14 in core/src/traits/t_resource.rs
github-actions / clippy
struct `Resource` is never constructed
warning: struct `Resource` is never constructed
--> core/src/traits/t_resource.rs:14:12
|
14 | pub struct Resource<T>
| ^^^^^^^^
Check warning on line 6 in core/src/traits/t_resource.rs
github-actions / clippy
enum `ResourceType` is never used
warning: enum `ResourceType` is never used
--> core/src/traits/t_resource.rs:6:10
|
6 | pub enum ResourceType {
| ^^^^^^^^^^^^
Check warning on line 23 in core/src/port_manager.rs
github-actions / clippy
method `allocate` is never used
warning: method `allocate` is never used
--> core/src/port_manager.rs:23:12
|
18 | impl PortManager {
| ---------------- method in this implementation
...
23 | pub fn allocate(&mut self, start_port: u32) -> u32 {
| ^^^^^^^^
Check warning on line 222 in core/src/macro_executor.rs
github-actions / clippy
field `channel_table` is never read
warning: field `channel_table` is never read
--> core/src/macro_executor.rs:222:5
|
219 | pub struct MacroExecutor {
| ------------- field in this struct
...
222 | channel_table:
| ^^^^^^^^^^^^^
|
= note: `MacroExecutor` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
Check warning on line 1883 in core/src/implementations/minecraft/configurable.rs
github-actions / clippy
method `to_line` is never used
warning: method `to_line` is never used
--> core/src/implementations/minecraft/configurable.rs:1883:12
|
1416 | impl ServerPropertySetting {
| -------------------------- method in this implementation
...
1883 | pub fn to_line(&self) -> String {
| ^^^^^^^
Check warning on line 313 in core/src/implementations/minecraft/configurable.rs
github-actions / clippy
associated function `from_key_val` is never used
warning: associated function `from_key_val` is never used
--> core/src/implementations/minecraft/configurable.rs:313:12
|
281 | impl CmdArgSetting {
| ------------------ associated function in this implementation
...
313 | pub fn from_key_val(key: &str, val: &str) -> Result<Self, Error> {
| ^^^^^^^^^^^^
Check warning on line 207 in core/src/implementations/minecraft/configurable.rs
github-actions / clippy
associated items `get_identifier`, `get_name`, `get_description`, and `from_key_val` are never used
warning: associated items `get_identifier`, `get_name`, `get_description`, and `from_key_val` are never used
--> core/src/implementations/minecraft/configurable.rs:207:12
|
206 | impl InstanceSetting {
| -------------------- associated items in this implementation
207 | pub fn get_identifier(&self) -> String {
| ^^^^^^^^^^^^^^
...
213 | pub fn get_name(&self) -> String {
| ^^^^^^^^
...
219 | pub fn get_description(&self) -> String {
| ^^^^^^^^^^^^^^^
...
225 | pub fn from_key_val(key: &str, value: &str) -> Result<Self, Error> {
| ^^^^^^^^^^^^
Check warning on line 187 in core/src/implementations/minecraft/mod.rs
github-actions / clippy
fields `path_to_resources`, `restart_on_crash`, and `backup_period` are never read
warning: fields `path_to_resources`, `restart_on_crash`, and `backup_period` are never read
--> core/src/implementations/minecraft/mod.rs:187:5
|
174 | pub struct MinecraftInstance {
| ----------------- fields in this struct
...
187 | path_to_resources: PathBuf,
| ^^^^^^^^^^^^^^^^^
...
192 | restart_on_crash: Arc<AtomicBool>,
| ^^^^^^^^^^^^^^^^
193 | backup_period: Option<u32>,
| ^^^^^^^^^^^^^
|
= note: `MinecraftInstance` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
Check warning on line 337 in core/src/implementations/generic/bridge/procedure_call.rs
github-actions / clippy
field `procedure_call_kind` is never read
warning: field `procedure_call_kind` is never read
--> core/src/implementations/generic/bridge/procedure_call.rs:337:5
|
334 | pub struct ProcedureCallResultIR {
| --------------------- field in this struct
...
337 | procedure_call_kind: ProcedureCallKind,
| ^^^^^^^^^^^^^^^^^^^
|
= note: `ProcedureCallResultIR` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
Check warning on line 39 in core/src/implementations/generic/mod.rs
github-actions / clippy
fields `event_broadcaster`, `core_macro_executor`, `core_macro_pid`, and `drop_guard` are never read
warning: fields `event_broadcaster`, `core_macro_executor`, `core_macro_pid`, and `drop_guard` are never read
--> core/src/implementations/generic/mod.rs:39:5
|
37 | pub struct GenericInstance {
| --------------- fields in this struct
38 | dot_lodestone_config: DotLodestoneConfig,
39 | event_broadcaster: EventBroadcaster,
| ^^^^^^^^^^^^^^^^^
40 | procedure_bridge: bridge::procedure_call::ProcedureBridge,
41 | core_macro_executor: MacroExecutor,
| ^^^^^^^^^^^^^^^^^^^
42 | path: PathBuf,
43 | core_macro_pid: MacroPID,
| ^^^^^^^^^^^^^^
44 | drop_guard: Arc<GenericDropGuard>,
| ^^^^^^^^^^
|
= note: `GenericInstance` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
Check warning on line 392 in core/src/implementations/generic/bridge/procedure_call.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> core/src/implementations/generic/bridge/procedure_call.rs:392:35
|
392 | let (procedure_result_tx, mut procedure_result_rx) = tokio::sync::broadcast::channel(256);
| ----^^^^^^^^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
Check warning on line 5 in core/src/prelude.rs
github-actions / clippy
unused imports: `BuildMetadata`, `Prerelease`
warning: unused imports: `BuildMetadata`, `Prerelease`
--> core/src/prelude.rs:5:14
|
5 | use semver::{BuildMetadata, Prerelease};
| ^^^^^^^^^^^^^ ^^^^^^^^^^
Check warning on line 14 in core/src/implementations/generic/bridge/procedure_call.rs
github-actions / clippy
unused import: `debug`
warning: unused import: `debug`
--> core/src/implementations/generic/bridge/procedure_call.rs:14:15
|
14 | use tracing::{debug, error};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default