merge #516
Annotations
7 errors and 2 warnings
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/commands/edge_app.rs#L728
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/commands/edge_app.rs:728:9
|
728 | / match InstanceManifest::new(path) {
729 | | Ok(manifest) => {
730 | | if manifest.id.is_some() {
731 | | return Err(CommandError::InstanceAlreadyExists);
... |
734 | | Err(_) => {}
735 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `-D clippy::single-match` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_match)]`
help: try
|
728 ~ if let Ok(manifest) = InstanceManifest::new(path) {
729 + if manifest.id.is_some() {
730 + return Err(CommandError::InstanceAlreadyExists);
731 + }
732 + }
|
|
constant `RESERVED_SETTING_NAMES` is never used:
src/commands/edge_app_settings.rs#L13
error: constant `RESERVED_SETTING_NAMES` is never used
--> src/commands/edge_app_settings.rs:13:7
|
13 | const RESERVED_SETTING_NAMES: &[&str] = &[
| ^^^^^^^^^^^^^^^^^^^^^^
|
function `default_syntax` is never used:
src/commands/edge_app_manifest.rs#L120
error: function `default_syntax` is never used
--> src/commands/edge_app_manifest.rs:120:4
|
120 | fn default_syntax() -> String {
| ^^^^^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
variable does not need to be mutable:
src/commands/edge_app.rs#L195
error: variable does not need to be mutable
--> src/commands/edge_app.rs:195:13
|
195 | let mut manifest = EdgeAppManifest::new(&manifest_path)?;
| ----^^^^^^^^
| |
| help: remove this `mut`
|
= note: `-D unused-mut` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_mut)]`
|
this `else { if .. }` block can be collapsed:
src/commands/edge_app_utils.rs#L284
error: this `else { if .. }` block can be collapsed
--> src/commands/edge_app_utils.rs:284:12
|
284 | } else {
| ____________^
285 | | if instance_manifest.entrypoint_uri.is_some() {
286 | | return Err(CommandError::InvalidManifest(
287 | | "entrypoint_uri must not be set when entrypoint is not set".to_owned(),
288 | | ));
289 | | }
290 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-D clippy::collapsible-else-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
284 ~ } else if instance_manifest.entrypoint_uri.is_some() {
285 + return Err(CommandError::InvalidManifest(
286 + "entrypoint_uri must not be set when entrypoint is not set".to_owned(),
287 + ));
288 + }
|
|
unused import: `INSTANCE_MANIFEST_VERSION`:
src/commands/edge_app_utils.rs#L4
error: unused import: `INSTANCE_MANIFEST_VERSION`
--> src/commands/edge_app_utils.rs:4:60
|
4 | use crate::commands::instance_manifest::{InstanceManifest, INSTANCE_MANIFEST_VERSION};
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
Lint code base
Clippy had exited with the 101 exit code
|
Lint code base
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, 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/
|
Lint code base
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|