Change token types to String #22
check_format.yml
on: push
cargo fmt
13s
Clippy lint and check
47s
Annotations
10 errors and 10 warnings
mismatched types:
src/database/../tests/database/session_context.rs#L70
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:70:28
|
70 | refresh_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L71
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:71:27
|
71 | access_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L95
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:95:28
|
95 | refresh_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L96
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:96:27
|
96 | access_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L124
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:124:28
|
124 | refresh_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L125
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:125:27
|
125 | access_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L132
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:132:28
|
132 | refresh_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e1").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L133
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:133:27
|
133 | access_token: Uuid::parse_str("75ecdf25-538c-4fe0-872d-525570c96b91").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L162
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:162:28
|
162 | refresh_token: Uuid::parse_str("4473240f-2acb-422f-bd1a-5214554ed0e0").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
mismatched types:
src/database/../tests/database/session_context.rs#L163
error[E0308]: mismatched types
--> src/database/../tests/database/session_context.rs:163:27
|
163 | access_token: Uuid::parse_str("5c5e9172-9dff-4f35-afde-029a6f99652c").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
| |
| expected `String`, found `Uuid`
|
file is loaded as a module multiple times: `src/api/../tests/database/helpers.rs`:
src/api/ecdar_api.rs#L37
warning: file is loaded as a module multiple times: `src/api/../tests/database/helpers.rs`
--> src/api/ecdar_api.rs:37:1
|
37 | / #[path = "../tests/database/helpers.rs"]
38 | | pub mod helpers;
| |________________^ first loaded here
|
::: src/database/../tests/database/user_context.rs:1:1
|
1 | / #[path = "helpers.rs"]
2 | | pub mod helpers;
| |________________^ 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: `#[warn(clippy::duplicate_mod)]` on by default
|
unused import: `crate::database::database_context::DatabaseContextTrait`:
src/api/ecdar_api.rs#L15
warning: unused import: `crate::database::database_context::DatabaseContextTrait`
--> src/api/ecdar_api.rs:15:5
|
15 | use crate::database::database_context::DatabaseContextTrait;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
fields `model_context`, `access_context`, `query_context`, `session_context`, and `in_use_context` are never read:
src/api/ecdar_api.rs#L43
warning: fields `model_context`, `access_context`, `query_context`, `session_context`, and `in_use_context` are never read
--> src/api/ecdar_api.rs:43:5
|
41 | pub struct ConcreteEcdarApi {
| ---------------- fields in this struct
42 | reveaal_address: String,
43 | model_context: Arc<dyn ModelContextTrait>,
| ^^^^^^^^^^^^^
44 | user_context: Arc<dyn UserContextTrait>,
45 | access_context: Arc<dyn AccessContextTrait>,
| ^^^^^^^^^^^^^^
46 | query_context: Arc<dyn QueryContextTrait>,
| ^^^^^^^^^^^^^
47 | session_context: Arc<dyn SessionContextTrait>,
| ^^^^^^^^^^^^^^^
48 | in_use_context: Arc<dyn InUseContextTrait>,
| ^^^^^^^^^^^^^^
|
= note: `ConcreteEcdarApi` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
associated function `setup_in_memory_db` is never used:
src/api/ecdar_api.rs#L85
warning: associated function `setup_in_memory_db` is never used
--> src/api/ecdar_api.rs:85:18
|
65 | impl ConcreteEcdarApi {
| --------------------- associated function in this implementation
...
85 | pub async fn setup_in_memory_db(entities: Vec<AnyEntity>) -> Self {
| ^^^^^^^^^^^^^^^^^^
|
unused import: `crate::database::database_context::DatabaseContextTrait`:
src/api/ecdar_api.rs#L15
warning: unused import: `crate::database::database_context::DatabaseContextTrait`
--> src/api/ecdar_api.rs:15:5
|
15 | use crate::database::database_context::DatabaseContextTrait;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `entity_context::EntityContextTrait`:
src/api/../tests/database/helpers.rs#L3
warning: unused import: `entity_context::EntityContextTrait`
--> src/api/../tests/database/helpers.rs:3:55
|
3 | database::{database_context::DatabaseContext, entity_context::EntityContextTrait},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
function `setup_db_with_entities` is never used:
src/api/../tests/database/helpers.rs#L14
warning: function `setup_db_with_entities` is never used
--> src/api/../tests/database/helpers.rs:14:18
|
14 | pub async fn setup_db_with_entities(entities: Vec<AnyEntity>) -> DatabaseContext {
| ^^^^^^^^^^^^^^^^^^^^^^
|
enum `AnyEntity` is never used:
src/api/../tests/database/helpers.rs#L25
warning: enum `AnyEntity` is never used
--> src/api/../tests/database/helpers.rs:25:14
|
25 | pub enum AnyEntity {
| ^^^^^^^^^
|
method `create_table_from` is never used:
src/api/../tests/database/helpers.rs#L35
warning: method `create_table_from` is never used
--> src/api/../tests/database/helpers.rs:35:18
|
34 | impl AnyEntity {
| -------------- method in this implementation
35 | async fn create_table_from(&self, connection: &DatabaseConnection, schema: &Schema) {
| ^^^^^^^^^^^^^^^^^
|
module has the same name as its containing module:
src/api/../tests/database/helpers.rs#L1
warning: module has the same name as its containing module
--> src/api/../tests/database/helpers.rs:1:1
|
1 | / pub mod helpers {
2 | | use crate::{
3 | | database::{database_context::DatabaseContext, entity_context::EntityContextTrait},
4 | | entities::access::Entity as AccessEntity,
... |
62 | | }
63 | | }
| |_^
|
= 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
|