cargo fmt #30
Annotations
1 error and 10 warnings
clippy --all-targets --all-features
Clippy has exited with exit code 101
|
clippy --all-targets --all-features:
src/api/ecdar_api.rs#L6
warning: unused import: `crate::entities::access`
--> src/api/ecdar_api.rs:6:5
|
6 | use crate::entities::access;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
clippy --all-targets --all-features:
src/api/ecdar_api.rs#L18
warning: unused import: `crate::database::database_context::DatabaseContextTrait`
--> src/api/ecdar_api.rs:18:5
|
18 | use crate::database::database_context::DatabaseContextTrait;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
clippy --all-targets --all-features:
src/api/ecdar_api.rs#L46
warning: fields `model_context`, `access_context`, `query_context`, and `in_use_context` are never read
--> src/api/ecdar_api.rs:46:5
|
44 | pub struct ConcreteEcdarApi {
| ---------------- fields in this struct
45 | reveaal_address: String,
46 | model_context: Arc<dyn ModelContextTrait>,
| ^^^^^^^^^^^^^
47 | user_context: Arc<dyn UserContextTrait>,
48 | access_context: Arc<dyn AccessContextTrait>,
| ^^^^^^^^^^^^^^
49 | query_context: Arc<dyn QueryContextTrait>,
| ^^^^^^^^^^^^^
50 | session_context: Arc<dyn SessionContextTrait>,
51 | 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
|
clippy --all-targets --all-features:
src/api/ecdar_api.rs#L152
warning: associated function `setup_in_memory_db` is never used
--> src/api/ecdar_api.rs:152:18
|
132 | impl ConcreteEcdarApi {
| --------------------- associated function in this implementation
...
152 | pub async fn setup_in_memory_db(entities: Vec<AnyEntity>) -> Self {
| ^^^^^^^^^^^^^^^^^^
|
clippy --all-targets --all-features:
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},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
clippy --all-targets --all-features:
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 {
| ^^^^^^^^^^^^^^^^^^^^^^
|
clippy --all-targets --all-features:
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 {
| ^^^^^^^^^
|
clippy --all-targets --all-features:
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) {
| ^^^^^^^^^^^^^^^^^
|
clippy --all-targets --all-features:
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
|
clippy --all-targets --all-features:
src/api/../tests/database/helpers.rs#L36
warning: unneeded late initialization
--> src/api/../tests/database/helpers.rs:36:13
|
36 | let stmt: TableCreateStatement;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: declare `stmt` here
|
37 | let stmt: TableCreateStatement = match self {
| ++++++++++++++++++++++++++++++++
help: remove the assignments from the `match` arms
|
39 ~ schema.create_table_from_entity(UserEntity)
40 | }
41 | AnyEntity::Model => {
42 ~ schema.create_table_from_entity(ModelEntity)
43 | }
44 | AnyEntity::Access => {
45 ~ schema.create_table_from_entity(AccessEntity)
46 | }
47 | AnyEntity::Session => {
48 ~ schema.create_table_from_entity(SessionEntity)
49 | }
50 | AnyEntity::InUse => {
51 ~ schema.create_table_from_entity(InUseEntity)
52 | }
53 | AnyEntity::Query => {
54 ~ schema.create_table_from_entity(QueryEntity)
|
help: add a semicolon after the `match` expression
|
56 | };
| +
|
The logs for this run have expired and are no longer available.
Loading