Skip to content

Fix missing model id when calling update method #125

Fix missing model id when calling update method

Fix missing model id when calling update method #125

Triggered via push November 28, 2023 11:57
Status Failure
Total duration 55s
Artifacts

check_format.yml

on: push
cargo fmt
17s
cargo fmt
Clippy lint and check
43s
Clippy lint and check
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 16 warnings
cargo fmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
this if-then-else expression assigns a bool literal: src/api/ecdar_api.rs#L184
error: this if-then-else expression assigns a bool literal --> src/api/ecdar_api.rs:184:25 | 184 | / if access.role == "Editor" { 185 | | is_editor = true; 186 | | } else { 187 | | is_editor = false; 188 | | } | |_________________________^ help: you can reduce it to: `is_editor = access.role == "Editor";` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign = note: `-D clippy::needless-bool-assign` implied by `-D clippy::complexity` = help: to override `-D clippy::complexity` add `#[allow(clippy::needless_bool_assign)]`
this if-then-else expression assigns a bool literal: src/api/ecdar_api.rs#L184
error: this if-then-else expression assigns a bool literal --> src/api/ecdar_api.rs:184:25 | 184 | / if access.role == "Editor" { 185 | | is_editor = true; 186 | | } else { 187 | | is_editor = false; 188 | | } | |_________________________^ help: you can reduce it to: `is_editor = access.role == "Editor";` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign = note: `-D clippy::needless-bool-assign` implied by `-D clippy::complexity` = help: to override `-D clippy::complexity` add `#[allow(clippy::needless_bool_assign)]`
Clippy lint and check
Clippy has exited with exit code 101
cargo fmt: src/api/ecdar_api.rs#L160
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
cargo fmt: src/api/ecdar_api.rs#L176
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
cargo fmt: src/api/ecdar_api.rs#L187
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
cargo fmt: src/api/ecdar_api.rs#L197
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
cargo fmt: src/api/ecdar_api.rs#L201
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
cargo fmt: src/api/ecdar_api.rs#L205
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
unused import: `crate::entities::access::Model`: src/api/ecdar_api.rs#L15
warning: unused import: `crate::entities::access::Model` --> src/api/ecdar_api.rs:15:5 | 15 | use crate::entities::access::Model; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `crate::entities::access::Model`: src/api/ecdar_api.rs#L15
warning: unused import: `crate::entities::access::Model` --> src/api/ecdar_api.rs:15:5 | 15 | use crate::entities::access::Model; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused variable: `access`: src/api/ecdar_api.rs#L179
warning: unused variable: `access` --> src/api/ecdar_api.rs:179:13 | 179 | let access = match self.access_context.get_access_by_uid_and_model_id(uid, model.id).await { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_access` | = note: `#[warn(unused_variables)]` on by default
unused variable: `access`: src/api/ecdar_api.rs#L179
warning: unused variable: `access` --> src/api/ecdar_api.rs:179:13 | 179 | let access = match self.access_context.get_access_by_uid_and_model_id(uid, model.id).await { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_access` | = note: `#[warn(unused_variables)]` on by default
field `in_use_context` is never read: src/api/ecdar_api.rs#L34
warning: field `in_use_context` is never read --> src/api/ecdar_api.rs:34:5 | 32 | pub struct ConcreteEcdarApi { | ---------------- field in this struct 33 | access_context: Arc<dyn AccessContextTrait>, 34 | in_use_context: Arc<dyn InUseContextTrait>, | ^^^^^^^^^^^^^^ | = note: `ConcreteEcdarApi` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
field `in_use_context` is never read: src/api/ecdar_api.rs#L34
warning: field `in_use_context` is never read --> src/api/ecdar_api.rs:34:5 | 32 | pub struct ConcreteEcdarApi { | ---------------- field in this struct 33 | access_context: Arc<dyn AccessContextTrait>, 34 | in_use_context: Arc<dyn InUseContextTrait>, | ^^^^^^^^^^^^^^ | = note: `ConcreteEcdarApi` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default
unused import: `futures::SinkExt`: src/api/../tests/api/ecdar_api.rs#L6
warning: unused import: `futures::SinkExt` --> src/api/../tests/api/ecdar_api.rs:6:9 | 6 | use futures::SinkExt; | ^^^^^^^^^^^^^^^^
methods `as_str` and `token_type` are never used: src/api/auth.rs#L177
warning: methods `as_str` and `token_type` are never used --> src/api/auth.rs:177:12 | 83 | impl Token { | ---------- methods in this implementation ... 177 | pub fn as_str(&self) -> &str { | ^^^^^^ ... 191 | pub fn token_type(&self) -> TokenType { | ^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
module has the same name as its containing module: src/api/server.rs#L18
warning: module has the same name as its containing module --> src/api/server.rs:18:1 | 18 | / pub mod server { 19 | | tonic::include_proto!("ecdar_proto_buf"); 20 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception = note: `#[warn(clippy::module_inception)]` on by default
module has the same name as its containing module: src/api/server.rs#L18
warning: module has the same name as its containing module --> src/api/server.rs:18:1 | 18 | / pub mod server { 19 | | tonic::include_proto!("ecdar_proto_buf"); 20 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception