Merge access_context.rs from 21-get-model #120
check_format.yml
on: push
cargo fmt
22s
Clippy lint and check
26s
Annotations
3 errors and 6 warnings
cargo fmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
not all trait items implemented, missing: `get_access_by_uid_and_model_id`:
src/tests/api/helpers.rs#L50
error[E0046]: not all trait items implemented, missing: `get_access_by_uid_and_model_id`
--> src/tests/api/helpers.rs:50:1
|
50 | / mock! {
51 | | pub AccessContext {}
52 | | #[async_trait]
53 | | impl EntityContextTrait<access::Model> for AccessContext {
... |
60 | | #[async_trait]
61 | | impl AccessContextTrait for AccessContext {}
| |_____________________________________________^ missing `get_access_by_uid_and_model_id` in implementation
|
::: src/database/access_context.rs:15:5
|
15 | / async fn get_access_by_uid_and_model_id(
16 | | &self,
17 | | uid: i32,
18 | | model_id: i32,
19 | | ) -> Result<Option<access::Model>, DbErr>;
| |______________________________________________- `get_access_by_uid_and_model_id` from trait
|
= note: this error originates in the macro `mock` (in Nightly builds, run with -Z macro-backtrace for more info)
|
Clippy lint and check
Clippy has exited with exit code 101
|
cargo fmt:
src/api/ecdar_api.rs#L159
Diff in /home/runner/work/Ecdar-API/Ecdar-API/src/api/ecdar_api.rs
|
unused variable: `uid`:
src/api/ecdar_api.rs#L166
warning: unused variable: `uid`
--> src/api/ecdar_api.rs:166:13
|
166 | let uid = request
| ^^^ help: if this is intentional, prefix it with an underscore: `_uid`
|
= note: `#[warn(unused_variables)]` on by default
|
field `in_use_context` is never read:
src/api/ecdar_api.rs#L33
warning: field `in_use_context` is never read
--> src/api/ecdar_api.rs:33:5
|
31 | pub struct ConcreteEcdarApi {
| ---------------- field in this struct
32 | access_context: Arc<dyn AccessContextTrait>,
33 | 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
|
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;
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
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
|