Upgrade/clean arch #77
Annotations
48 warnings
method `toHttpRes` should have a snake case name:
src/appv2/features/article/presenters.rs#L138
warning: method `toHttpRes` should have a snake case name
--> src/appv2/features/article/presenters.rs:138:12
|
138 | pub fn toHttpRes(&self) -> HttpResponse {
| ^^^^^^^^^ help: convert the identifier to snake case: `to_http_res`
|
= note: `#[warn(non_snake_case)]` on by default
|
methods called `from_*` usually take no `self`:
src/appv2/features/user/presenters.rs#L41
warning: methods called `from_*` usually take no `self`
--> src/appv2/features/user/presenters.rs:41:32
|
41 | pub fn from_user_and_token(&self, user: User, token: String) -> HttpResponse {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
|
methods called `from_*` usually take no `self`:
src/appv2/features/tag/presenters.rs#L24
warning: methods called `from_*` usually take no `self`
--> src/appv2/features/tag/presenters.rs:24:22
|
24 | pub fn from_list(&self, list: Vec<Tag>) -> HttpResponse {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
|
methods called `from_*` usually take no `self`:
src/appv2/features/profile/presenters.rs#L37
warning: methods called `from_*` usually take no `self`
--> src/appv2/features/profile/presenters.rs:37:25
|
37 | pub fn from_profile(&self, model: ProfileModel) -> HttpResponse {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
|
redundant clone:
src/appv2/features/favorite/repositories.rs#L43
warning: redundant clone
--> src/appv2/features/favorite/repositories.rs:43:41
|
43 | slug: article_title_slug.to_owned(),
| ^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> src/appv2/features/favorite/repositories.rs:43:23
|
43 | slug: article_title_slug.to_owned(),
| ^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
redundant clone:
src/appv2/features/favorite/repositories.rs#L23
warning: redundant clone
--> src/appv2/features/favorite/repositories.rs:23:41
|
23 | slug: article_title_slug.to_owned(),
| ^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> src/appv2/features/favorite/repositories.rs:23:23
|
23 | slug: article_title_slug.to_owned(),
| ^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
redundant clone:
src/appv2/features/article/usecases.rs#L48
warning: redundant clone
--> src/appv2/features/article/usecases.rs:48:52
|
48 | let article_title_slug = article_title_slug.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> src/appv2/features/article/usecases.rs:48:34
|
48 | let article_title_slug = article_title_slug.clone();
| ^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
|
this let-binding has unit value:
src/appv2/features/article/presenters.rs#L139
warning: this let-binding has unit value
--> src/appv2/features/article/presenters.rs:139:9
|
139 | let res = ();
| ^^^^^^^^^^^^^ help: omit the `let` binding: `();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
|
methods called `from_*` usually take no `self`:
src/appv2/features/article/presenters.rs#L134
warning: methods called `from_*` usually take no `self`
--> src/appv2/features/article/presenters.rs:134:22
|
134 | pub fn from_item(&self, item: (Article, Profile, FavoriteInfo, Vec<Tag>)) -> HttpResponse {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
|
methods called `from_*` usually take no `self`:
src/appv2/features/article/presenters.rs#L130
warning: methods called `from_*` usually take no `self`
--> src/appv2/features/article/presenters.rs:130:32
|
130 | pub fn from_list_and_count(&self, list: ArticlesList, count: i64) -> HttpResponse {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
|
type alias `Token` is never used:
src/appv2/features/tag/repositories.rs#L5
warning: type alias `Token` is never used
--> src/appv2/features/tag/repositories.rs:5:6
|
5 | type Token = String;
| ^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `diesel::prelude`:
src/appv2/features/article/services.rs#L11
warning: unused import: `diesel::prelude`
--> src/appv2/features/article/services.rs:11:5
|
11 | use diesel::prelude::*;
| ^^^^^^^^^^^^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository:
src/appv2/features/profile/services.rs#L21
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
--> src/appv2/features/profile/services.rs:21:16
|
21 | image: params.user.image.to_owned(),
| ^^^^^^^^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository:
src/appv2/features/profile/services.rs#L20
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
--> src/appv2/features/profile/services.rs:20:14
|
20 | bio: params.user.bio.to_owned(),
| ^^^^^^^^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository:
src/appv2/features/profile/services.rs#L19
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
--> src/appv2/features/profile/services.rs:19:19
|
19 | username: params.user.username.to_owned(),
| ^^^^^^^^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository:
src/appv2/features/profile/services.rs#L14
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
--> src/appv2/features/profile/services.rs:14:64
|
14 | Some(current_user) => current_user.is_following(conn, ¶ms.user.id),
| ^^^^^^^^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::current_user`: use repository:
src/appv2/features/profile/services.rs#L13
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::current_user`: use repository
--> src/appv2/features/profile/services.rs:13:27
|
13 | let following = match params.current_user.as_ref() {
| ^^^^^^^^^^^^^^^^^^^
|
use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`:
src/appv2/drivers/middlewares/state.rs#L23
warning: use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`
--> src/appv2/drivers/middlewares/state.rs:23:20
|
23 | let conn = self.pool.get()?;
| ^^^^^^^^^
|
use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`:
src/appv2/drivers/middlewares/state.rs#L19
warning: use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`
--> src/appv2/drivers/middlewares/state.rs:19:16
|
19 | Self { pool, di_container }
| ^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::current_user`: use repository:
src/app/comment/service.rs#L62
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::current_user`: use repository
--> src/app/comment/service.rs:62:85
|
62 | let profile = conver_user_to_profile(conn, &ConverUserToProfile { user, current_user });
| ^^^^^^^^^^^^
|
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository:
src/app/comment/service.rs#L62
warning: use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
--> src/app/comment/service.rs:62:79
|
62 | let profile = conver_user_to_profile(conn, &ConverUserToProfile { user, current_user });
| ^^^^
|
use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository:
src/appv2/features/profile/services.rs#L12
warning: use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository
--> src/appv2/features/profile/services.rs:12:65
|
12 | pub fn conver_user_to_profile(conn: &mut PgConnection, params: &ConverUserToProfile) -> Profile {
| ^^^^^^^^^^^^^^^^^^^
|
use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository:
src/app/comment/service.rs#L62
warning: use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository
--> src/app/comment/service.rs:62:57
|
62 | let profile = conver_user_to_profile(conn, &ConverUserToProfile { user, current_user });
| ^^^^^^^^^^^^^^^^^^^
|
use of deprecated function `appv2::features::profile::services::conver_user_to_profile`: use repository:
src/app/comment/service.rs#L62
warning: use of deprecated function `appv2::features::profile::services::conver_user_to_profile`: use repository
--> src/app/comment/service.rs:62:27
|
62 | let profile = conver_user_to_profile(conn, &ConverUserToProfile { user, current_user });
| ^^^^^^^^^^^^^^^^^^^^^^
|
use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository:
src/app/comment/service.rs#L4
warning: use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository
--> src/app/comment/service.rs:4:73
|
4 | use crate::appv2::features::profile::services::{conver_user_to_profile, ConverUserToProfile};
| ^^^^^^^^^^^^^^^^^^^
|
use of deprecated function `appv2::features::profile::services::conver_user_to_profile`: use repository:
src/app/comment/service.rs#L4
warning: use of deprecated function `appv2::features::profile::services::conver_user_to_profile`: use repository
--> src/app/comment/service.rs:4:49
|
4 | use crate::appv2::features::profile::services::{conver_user_to_profile, ConverUserToProfile};
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
unused import: `uuid::Uuid`:
src/appv2/features/favorite/usecases.rs#L10
warning: unused import: `uuid::Uuid`
--> src/appv2/features/favorite/usecases.rs:10:5
|
10 | use uuid::Uuid;
| ^^^^^^^^^^
|
unused import: `crate::schema::follows`:
src/appv2/features/article/services.rs#L138
warning: unused import: `crate::schema::follows`
--> src/appv2/features/article/services.rs:138:5
|
138 | use crate::schema::follows;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::schema::articles::dsl::*`:
src/appv2/features/article/services.rs#L8
warning: unused import: `crate::schema::articles::dsl::*`
--> src/appv2/features/article/services.rs:8:5
|
8 | use crate::schema::articles::dsl::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::appv2::features::follow::entities::Follow`:
src/appv2/features/article/services.rs#L3
warning: unused import: `crate::appv2::features::follow::entities::Follow`
--> src/appv2/features/article/services.rs:3:5
|
3 | use crate::appv2::features::follow::entities::Follow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `diesel::pg::PgConnection`:
src/appv2/features/article/repositories.rs#L207
warning: unused import: `diesel::pg::PgConnection`
--> src/appv2/features/article/repositories.rs:207:13
|
207 | use diesel::pg::PgConnection;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `PgConnection` is imported redundantly:
src/appv2/features/article/repositories.rs#L207
warning: the item `PgConnection` is imported redundantly
--> src/appv2/features/article/repositories.rs:207:13
|
1 | use diesel::PgConnection;
| -------------------- the item `PgConnection` is already imported here
...
207 | use diesel::pg::PgConnection;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `tags`:
src/appv2/features/article/repositories.rs#L206
warning: unused import: `tags`
--> src/appv2/features/article/repositories.rs:206:39
|
206 | use crate::schema::{articles, tags, users};
| ^^^^
|
unused import: `crate::error::AppError`:
src/appv2/features/article/repositories.rs#L203
warning: unused import: `crate::error::AppError`
--> src/appv2/features/article/repositories.rs:203:13
|
203 | use crate::error::AppError;
| ^^^^^^^^^^^^^^^^^^^^^^
|
the item `AppError` is imported redundantly:
src/appv2/features/article/repositories.rs#L203
warning: the item `AppError` is imported redundantly
--> src/appv2/features/article/repositories.rs:203:13
|
11 | use crate::error::AppError;
| ---------------------- the item `AppError` is already imported here
...
203 | use crate::error::AppError;
| ^^^^^^^^^^^^^^^^^^^^^^
|
the item `User` is imported redundantly:
src/appv2/features/article/repositories.rs#L202
warning: the item `User` is imported redundantly
--> src/appv2/features/article/repositories.rs:202:13
|
10 | use crate::appv2::features::user::entities::User;
| -------------------------------------------- the item `User` is already imported here
...
202 | use crate::appv2::features::user::entities::User;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Tag` is imported redundantly:
src/appv2/features/article/repositories.rs#L201
warning: the item `Tag` is imported redundantly
--> src/appv2/features/article/repositories.rs:201:13
|
9 | use crate::appv2::features::tag::entities::{CreateTag, Tag};
| --- the item `Tag` is already imported here
...
201 | use crate::appv2::features::tag::entities::Tag;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Profile` is imported redundantly:
src/appv2/features/article/repositories.rs#L200
warning: the item `Profile` is imported redundantly
--> src/appv2/features/article/repositories.rs:200:13
|
8 | use crate::appv2::features::profile::entities::Profile;
| -------------------------------------------------- the item `Profile` is already imported here
...
200 | use crate::appv2::features::profile::entities::Profile;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Follow` is imported redundantly:
src/appv2/features/article/repositories.rs#L199
warning: the item `Follow` is imported redundantly
--> src/appv2/features/article/repositories.rs:199:13
|
7 | use crate::appv2::features::follow::entities::Follow;
| ------------------------------------------------ the item `Follow` is already imported here
...
199 | use crate::appv2::features::follow::entities::Follow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `FavoriteInfo` is imported redundantly:
src/appv2/features/article/repositories.rs#L198
warning: the item `FavoriteInfo` is imported redundantly
--> src/appv2/features/article/repositories.rs:198:68
|
6 | use crate::appv2::features::favorite::entities::FavoriteInfo;
| -------------------------------------------------------- the item `FavoriteInfo` is already imported here
...
198 | use crate::appv2::features::favorite::entities::{Favorite, FavoriteInfo};
| ^^^^^^^^^^^^
|
unused import: `Favorite`:
src/appv2/features/article/repositories.rs#L198
warning: unused import: `Favorite`
--> src/appv2/features/article/repositories.rs:198:58
|
198 | use crate::appv2::features::favorite::entities::{Favorite, FavoriteInfo};
| ^^^^^^^^
|
the item `Article` is imported redundantly:
src/appv2/features/article/repositories.rs#L197
warning: the item `Article` is imported redundantly
--> src/appv2/features/article/repositories.rs:197:13
|
4 | use super::entities::{Article, CreateArticle, DeleteArticle, UpdateArticle};
| ------- the item `Article` is already imported here
...
197 | use crate::appv2::features::article::entities::Article;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::appv2::features::follow::entities::Follow`:
src/appv2/features/article/repositories.rs#L7
warning: unused import: `crate::appv2::features::follow::entities::Follow`
--> src/appv2/features/article/repositories.rs:7:5
|
7 | use crate::appv2::features::follow::entities::Follow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `HttpResponse`:
src/appv2/features/article/controllers.rs#L11
warning: unused import: `HttpResponse`
--> src/appv2/features/article/controllers.rs:11:35
|
11 | use actix_web::{web, HttpRequest, HttpResponse};
| ^^^^^^^^^^^^
|
unused imports: `Article`, `DeleteArticle`, `MultipleArticlesResponse`, `SingleArticleResponse`, `repositories::FetchFollowingArticlesRepositoryInput`:
src/appv2/features/article/controllers.rs#L2
warning: unused imports: `Article`, `DeleteArticle`, `MultipleArticlesResponse`, `SingleArticleResponse`, `repositories::FetchFollowingArticlesRepositoryInput`
--> src/appv2/features/article/controllers.rs:2:16
|
2 | entities::{Article, DeleteArticle},
| ^^^^^^^ ^^^^^^^^^^^^^
3 | presenters::{MultipleArticlesResponse, SingleArticleResponse},
| ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
4 | repositories::FetchFollowingArticlesRepositoryInput,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
clippy_check
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
|
test_unit
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
|
test_e2e
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
|