Skip to content

merge main

merge main #168

Triggered via push November 29, 2023 10:46
Status Failure
Total duration 1m 4s
Artifacts

check_format.yml

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

Annotations

8 errors and 3 warnings
the name `model_logic_tests` is defined multiple times: src/api/ecdar_api.rs#L759
error[E0428]: the name `model_logic_tests` is defined multiple times --> src/api/ecdar_api.rs:759:1 | 751 | mod model_logic_tests; | ---------------------- previous definition of the module `model_logic_tests` here ... 759 | mod model_logic_tests; | ^^^^^^^^^^^^^^^^^^^^^^ `model_logic_tests` redefined here | = note: `model_logic_tests` must be defined only once in the type namespace of this module
cannot find struct, variant or union type `Query` in this scope: src/api/ecdar_api.rs#L194
error[E0422]: cannot find struct, variant or union type `Query` in this scope --> src/api/ecdar_api.rs:194:26 | 194 | .map(|query| Query { | ^^^^^ not found in this scope | help: consider importing one of these items | 1 + use crate::api::server::server::Query; | 1 + use crate::entities::model::Relation::Query; | 1 + use crate::entities::prelude::Query; | 1 + use migration::DbErr::Query; | and 3 other candidates
cannot find type `Query` in this scope: src/api/ecdar_api.rs#L204
error[E0412]: cannot find type `Query` in this scope --> src/api/ecdar_api.rs:204:28 | 204 | .collect::<Vec<Query>>(); | ^^^^^ not found in this scope | help: consider importing one of these items | 1 + use crate::api::server::server::Query; | 1 + use crate::entities::prelude::Query; | 1 + use migration::Query; |
method `update_model` has an incompatible type for trait: src/api/ecdar_api.rs#L240
error[E0053]: method `update_model` has an incompatible type for trait --> src/api/ecdar_api.rs:240:44 | 240 | async fn update_model(&self, _request: Request<()>) -> Result<Response<()>, Status> { | ^^^^^^^^^^^ | | | expected `UpdateModelRequest`, found `()` | help: change the parameter type to match the trait: `tonic::Request<api::server::server::UpdateModelRequest>` | note: type in trait --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-eaa07576554c49a0/out/ecdar_proto_buf.rs:1979:22 | 1979 | request: tonic::Request<super::UpdateModelRequest>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: expected signature `fn(&'life0 api::ecdar_api::ConcreteEcdarApi, tonic::Request<api::server::server::UpdateModelRequest>) -> std::pin::Pin<_>` found signature `fn(&'life0 api::ecdar_api::ConcreteEcdarApi, tonic::Request<()>) -> std::pin::Pin<_>`
cannot find struct, variant or union type `Query` in this scope: src/api/ecdar_api.rs#L194
error[E0422]: cannot find struct, variant or union type `Query` in this scope --> src/api/ecdar_api.rs:194:26 | 194 | .map(|query| Query { | ^^^^^ not found in this scope | help: consider importing one of these items | 1 + use crate::api::server::server::Query; | 1 + use crate::entities::prelude::Query; | 1 + use migration::DbErr::Query; | 1 + use migration::Query; | and 2 other candidates
cannot find type `Query` in this scope: src/api/ecdar_api.rs#L204
error[E0412]: cannot find type `Query` in this scope --> src/api/ecdar_api.rs:204:28 | 204 | .collect::<Vec<Query>>(); | ^^^^^ not found in this scope | help: consider importing one of these items | 1 + use crate::api::server::server::Query; | 1 + use crate::entities::prelude::Query; | 1 + use migration::Query; |
method `update_model` has an incompatible type for trait: src/api/ecdar_api.rs#L240
error[E0053]: method `update_model` has an incompatible type for trait --> src/api/ecdar_api.rs:240:44 | 240 | async fn update_model(&self, _request: Request<()>) -> Result<Response<()>, Status> { | ^^^^^^^^^^^ | | | expected `UpdateModelRequest`, found `()` | help: change the parameter type to match the trait: `tonic::Request<api::server::server::UpdateModelRequest>` | note: type in trait --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-eaa07576554c49a0/out/ecdar_proto_buf.rs:1979:22 | 1979 | request: tonic::Request<super::UpdateModelRequest>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: expected signature `fn(&'life0 api::ecdar_api::ConcreteEcdarApi, tonic::Request<api::server::server::UpdateModelRequest>) -> std::pin::Pin<_>` found signature `fn(&'life0 api::ecdar_api::ConcreteEcdarApi, tonic::Request<()>) -> std::pin::Pin<_>`
Clippy lint and check
Clippy has exited with exit code 101
file is loaded as a module multiple times: `src/api/../tests/api/model_logic.rs`: src/api/ecdar_api.rs#L749
warning: file is loaded as a module multiple times: `src/api/../tests/api/model_logic.rs` --> src/api/ecdar_api.rs:749:1 | 749 | / #[cfg(test)] 750 | | #[path = "../tests/api/model_logic.rs"] 751 | | mod model_logic_tests; | |______________________^ first loaded here ... 757 | / #[cfg(test)] 758 | | #[path = "../tests/api/model_logic.rs"] 759 | | mod model_logic_tests; | |______________________^ loaded again here | = help: replace all but one `mod` item with `use` items = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicate_mod = note: `-W clippy::duplicate-mod` implied by `-W clippy::suspicious` = help: to override `-W clippy::suspicious` add `#[allow(clippy::duplicate_mod)]`
cannot test inner items: src/database/../tests/database/model_context.rs#L407
warning: cannot test inner items --> src/database/../tests/database/model_context.rs:407:5 | 407 | #[tokio::test] | ^^^^^^^^^^^^^^ | = note: `#[warn(unnameable_test_items)]` on by default = note: this warning originates in the attribute macro `::core::prelude::v1::test` (in Nightly builds, run with -Z macro-backtrace for more info)
cannot test inner items: src/database/../tests/database/model_context.rs#L437
warning: cannot test inner items --> src/database/../tests/database/model_context.rs:437:5 | 437 | #[tokio::test] | ^^^^^^^^^^^^^^ | = note: this warning originates in the attribute macro `::core::prelude::v1::test` (in Nightly builds, run with -Z macro-backtrace for more info)