Skip to content

Adds: api functions for all edge apps commands. #537

Adds: api functions for all edge apps commands.

Adds: api functions for all edge apps commands. #537

Triggered via push August 30, 2024 16:44
Status Failure
Total duration 2m 3s
Artifacts

lint.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

45 errors and 2 warnings
useless use of `format!`: src/api/edge_app/setting.rs#L415
error: useless use of `format!` --> src/api/edge_app/setting.rs:415:14 | 415 | &format!("v4.1/edge-apps/secrets/values"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"v4.1/edge-apps/secrets/values".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
useless use of `format!`: src/api/edge_app/setting.rs#L398
error: useless use of `format!` --> src/api/edge_app/setting.rs:398:14 | 398 | &format!("v4.1/edge-apps/secrets/values"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"v4.1/edge-apps/secrets/values".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
useless use of `format!`: src/api/edge_app/setting.rs#L357
error: useless use of `format!` --> src/api/edge_app/setting.rs:357:14 | 357 | &format!("v4.1/edge-apps/settings/values"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"v4.1/edge-apps/settings/values".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
useless use of `format!`: src/api/edge_app/setting.rs#L340
error: useless use of `format!` --> src/api/edge_app/setting.rs:340:14 | 340 | &format!("v4.1/edge-apps/settings/values"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"v4.1/edge-apps/settings/values".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `-D clippy::useless-format` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
question mark operator is useless here: src/api/edge_app/setting.rs#L307
error: question mark operator is useless here --> src/api/edge_app/setting.rs:307:9 | 307 | / Ok(commands::patch( 308 | | &self.authentication, 309 | | &format!( 310 | | "v4.1/edge-apps/settings?app_id=eq.{id}&name=eq.{name}", ... | 314 | | &payload, 315 | | )?) | |___________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: try removing question mark and `Ok()` | 307 ~ commands::patch( 308 + &self.authentication, 309 + &format!( 310 + "v4.1/edge-apps/settings?app_id=eq.{id}&name=eq.{name}", 311 + id = app_id, 312 + name = setting.name 313 + ), 314 + &payload, 315 + ) |
question mark operator is useless here: src/api/edge_app/setting.rs#L297
error: question mark operator is useless here --> src/api/edge_app/setting.rs:297:9 | 297 | Ok(commands::post(&self.authentication, "v4.1/edge-apps/settings", &payload)?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `commands::post(&self.authentication, "v4.1/edge-apps/settings", &payload)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
comparison to empty slice: src/commands/edge_app/setting.rs#L124
error: comparison to empty slice --> src/commands/edge_app/setting.rs:124:16 | 124 | if actual_installation_id == "" { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `actual_installation_id.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
comparison to empty slice: src/commands/edge_app/setting.rs#L104
error: comparison to empty slice --> src/commands/edge_app/setting.rs:104:20 | 104 | if actual_installation_id == "" { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `actual_installation_id.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
comparison to empty slice: src/commands/edge_app/setting.rs#L90
error: comparison to empty slice --> src/commands/edge_app/setting.rs:90:20 | 90 | if actual_installation_id == "" { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `actual_installation_id.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
comparison to empty slice: src/commands/edge_app/setting.rs#L64
error: comparison to empty slice --> src/commands/edge_app/setting.rs:64:16 | 64 | if actual_installation_id == "" { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `actual_installation_id.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty = note: `-D clippy::comparison-to-empty` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]`
question mark operator is useless here: src/commands/edge_app/setting.rs#L17
error: question mark operator is useless here --> src/commands/edge_app/setting.rs:17:9 | 17 | Ok(self.api.list_settings(&app_id)?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.api.list_settings(&app_id)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
question mark operator is useless here: src/commands/edge_app/instance.rs#L16
error: question mark operator is useless here --> src/commands/edge_app/instance.rs:16:9 | 16 | Ok(self.api.list_installations(app_id)?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.api.list_installations(app_id)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
question mark operator is useless here: src/commands/edge_app/app.rs#L385
error: question mark operator is useless here --> src/commands/edge_app/app.rs:385:9 | 385 | Ok(self.api.create_version(json)?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.api.create_version(json)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
question mark operator is useless here: src/commands/edge_app/app.rs#L128
error: question mark operator is useless here --> src/commands/edge_app/app.rs:128:9 | 128 | Ok(self.api.list_apps()?) | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.api.list_apps()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `-D clippy::needless-question-mark` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`
unused variable: `app_id`: src/api/edge_app/setting.rs#L347
error: unused variable: `app_id` --> src/api/edge_app/setting.rs:347:46 | 347 | pub fn create_local_setting_value(&self, app_id: &str, installation_id: &str, setting_key: &str, setting_value: &str) -> Result<(), C... | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_app_id`
value assigned to `settings_values_payload` is never read: src/commands/edge_app/setting.rs#L68
error: value assigned to `settings_values_payload` is never read --> src/commands/edge_app/setting.rs:68:13 | 68 | settings_values_payload = json!( | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: maybe it is overwritten before being read?
value assigned to `settings_values_payload` is never read: src/commands/edge_app/setting.rs#L55
error: value assigned to `settings_values_payload` is never read --> src/commands/edge_app/setting.rs:55:13 | 55 | settings_values_payload = json!( | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: maybe it is overwritten before being read? = note: `-D unused-assignments` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_assignments)]`
unused variable: `settings_values_patch_url`: src/commands/edge_app/setting.rs#L51
error: unused variable: `settings_values_patch_url` --> src/commands/edge_app/setting.rs:51:13 | 51 | let settings_values_patch_url: String; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_settings_values_patch_url`
variable `settings_values_payload` is assigned to, but never used: src/commands/edge_app/setting.rs#L50
error: variable `settings_values_payload` is assigned to, but never used --> src/commands/edge_app/setting.rs:50:13 | 50 | let settings_values_payload: Value; | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: consider using `_settings_values_payload` instead
unused variable: `setting_url`: src/commands/edge_app/setting.rs#L49
error: unused variable: `setting_url` --> src/commands/edge_app/setting.rs:49:13 | 49 | let setting_url: String; | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_setting_url` | = note: `-D unused-variables` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_variables)]`
unused import: `serde_json::Value`: src/api/asset.rs#L6
error: unused import: `serde_json::Value` --> src/api/asset.rs:6:5 | 6 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^
unused imports: `deserialize_string_field` and `serialize_non_empty_string_field`: src/api/edge_app/installation.rs#L15
error: unused imports: `deserialize_string_field` and `serialize_non_empty_string_field` --> src/api/edge_app/installation.rs:15:36 | 15 | use crate::commands::serde_utils::{deserialize_string_field, serialize_non_empty_string_field}; | ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused imports: `Display`, `EnumIter`, and `EnumString`: src/api/edge_app/installation.rs#L13
error: unused imports: `Display`, `EnumIter`, and `EnumString` --> src/api/edge_app/installation.rs:13:20 | 13 | use strum_macros::{Display, EnumIter, EnumString}; | ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^
unused import: `strum::IntoEnumIterator`: src/api/edge_app/installation.rs#L12
error: unused import: `strum::IntoEnumIterator` --> src/api/edge_app/installation.rs:12:5 | 12 | use strum::IntoEnumIterator; | ^^^^^^^^^^^^^^^^^^^^^^^
unused import: `serde::Deserializer`: src/api/edge_app/installation.rs#L11
error: unused import: `serde::Deserializer` --> src/api/edge_app/installation.rs:11:5 | 11 | use serde::Deserializer; | ^^^^^^^^^^^^^^^^^^^
unused import: `log::debug`: src/api/edge_app/installation.rs#L9
error: unused import: `log::debug` --> src/api/edge_app/installation.rs:9:5 | 9 | use log::debug; | ^^^^^^^^^^
unused import: `serde_json::Value`: src/api/edge_app/installation.rs#L8
error: unused import: `serde_json::Value` --> src/api/edge_app/installation.rs:8:5 | 8 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^
unused import: `std::str::FromStr`: src/api/edge_app/installation.rs#L7
error: unused import: `std::str::FromStr` --> src/api/edge_app/installation.rs:7:5 | 7 | use std::str::FromStr; | ^^^^^^^^^^^^^^^^^
unused import: `std::ops::Not`: src/api/edge_app/installation.rs#L6
error: unused import: `std::ops::Not` --> src/api/edge_app/installation.rs:6:5 | 6 | use std::ops::Not; | ^^^^^^^^^^^^^
unused import: `std::collections::HashMap`: src/api/edge_app/installation.rs#L5
error: unused import: `std::collections::HashMap` --> src/api/edge_app/installation.rs:5:5 | 5 | use std::collections::HashMap; | ^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `Serialize`: src/api/edge_app/version.rs#L16
error: unused import: `Serialize` --> src/api/edge_app/version.rs:16:26 | 16 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^
unused imports: `deserialize_string_field` and `serialize_non_empty_string_field`: src/api/edge_app/version.rs#L15
error: unused imports: `deserialize_string_field` and `serialize_non_empty_string_field` --> src/api/edge_app/version.rs:15:36 | 15 | use crate::commands::serde_utils::{deserialize_string_field, serialize_non_empty_string_field}; | ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused imports: `Display`, `EnumIter`, and `EnumString`: src/api/edge_app/version.rs#L13
error: unused imports: `Display`, `EnumIter`, and `EnumString` --> src/api/edge_app/version.rs:13:20 | 13 | use strum_macros::{Display, EnumIter, EnumString}; | ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^
unused import: `strum::IntoEnumIterator`: src/api/edge_app/version.rs#L12
error: unused import: `strum::IntoEnumIterator` --> src/api/edge_app/version.rs:12:5 | 12 | use strum::IntoEnumIterator; | ^^^^^^^^^^^^^^^^^^^^^^^
unused import: `std::str::FromStr`: src/api/edge_app/version.rs#L7
error: unused import: `std::str::FromStr` --> src/api/edge_app/version.rs:7:5 | 7 | use std::str::FromStr; | ^^^^^^^^^^^^^^^^^
unused import: `std::ops::Not`: src/api/edge_app/version.rs#L6
error: unused import: `std::ops::Not` --> src/api/edge_app/version.rs:6:5 | 6 | use std::ops::Not; | ^^^^^^^^^^^^^
redundant field names in struct initialization: src/commands/edge_app/mod.rs#L22
error: redundant field names in struct initialization --> src/commands/edge_app/mod.rs:22:26 | 22 | Self { api: Api{ authentication: authentication } } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `authentication` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `-D clippy::redundant-field-names` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_field_names)]`
unused imports: `Deserialize` and `Serialize`: src/commands/edge_app/mod.rs#L14
error: unused imports: `Deserialize` and `Serialize` --> src/commands/edge_app/mod.rs:14:13 | 14 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^
unused import: `crate::commands`: src/commands/edge_app/setting.rs#L1
error: unused import: `crate::commands` --> src/commands/edge_app/setting.rs:1:5 | 1 | use crate::commands; | ^^^^^^^^^^^^^^^
unused import: `serde_json::json`: src/commands/edge_app/instance.rs#L10
error: unused import: `serde_json::json` --> src/commands/edge_app/instance.rs:10:5 | 10 | use serde_json::json; | ^^^^^^^^^^^^^^^^
unused imports: `Deserialize` and `Serialize`: src/commands/edge_app/instance.rs#L9
error: unused imports: `Deserialize` and `Serialize` --> src/commands/edge_app/instance.rs:9:13 | 9 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^
unused import: `crate::commands`: src/commands/edge_app/instance.rs#L2
error: unused import: `crate::commands` --> src/commands/edge_app/instance.rs:2:5 | 2 | use crate::commands; | ^^^^^^^^^^^^^^^
unused imports: `Deserialize` and `Serialize`: src/commands/edge_app/app.rs#L16
error: unused imports: `Deserialize` and `Serialize` --> src/commands/edge_app/app.rs:16:13 | 16 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^
unused import: `crate::commands`: src/commands/edge_app/app.rs#L1
error: unused import: `crate::commands` --> src/commands/edge_app/app.rs:1:5 | 1 | use crate::commands; | ^^^^^^^^^^^^^^^ | = 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 use a deprecated Node.js version 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/