Skip to content

Upgrade/clean arch

Upgrade/clean arch #83

Triggered via pull request June 13, 2023 01:40
Status Success
Total duration 8m 44s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

49 warnings
unused `std::result::Result` that must be used: src/appv2/features/comment/usecases.rs#L51
warning: unused `std::result::Result` that must be used --> src/appv2/features/comment/usecases.rs:51:9 | 51 | / self.comment_repository 52 | | .delete(&article_title_slug, comment_id, author_id); | |_______________________________________________________________^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default
method `toHttpRes` should have a snake case name: src/appv2/features/comment/presenters.rs#L95
warning: method `toHttpRes` should have a snake case name --> src/appv2/features/comment/presenters.rs:95:12 | 95 | pub fn toHttpRes(&self) -> HttpResponse { | ^^^^^^^^^ help: convert the identifier to snake case: `to_http_res`
method `toHttpRes` should have a snake case name: src/appv2/features/article/presenters.rs#L137
warning: method `toHttpRes` should have a snake case name --> src/appv2/features/article/presenters.rs:137:12 | 137 | 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#L49
warning: redundant clone --> src/appv2/features/favorite/repositories.rs:49:41 | 49 | slug: article_title_slug.to_owned(), | ^^^^^^^^^^^ help: remove this | note: this value is dropped without further use --> src/appv2/features/favorite/repositories.rs:49:23 | 49 | 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#L29
warning: redundant clone --> src/appv2/features/favorite/repositories.rs:29:41 | 29 | slug: article_title_slug.to_owned(), | ^^^^^^^^^^^ help: remove this | note: this value is dropped without further use --> src/appv2/features/favorite/repositories.rs:29:23 | 29 | slug: article_title_slug.to_owned(), | ^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
this expression creates a reference which is immediately dereferenced by the compiler: src/appv2/features/comment/usecases.rs#L52
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/appv2/features/comment/usecases.rs:52:21 | 52 | .delete(&article_title_slug, comment_id, author_id); | ^^^^^^^^^^^^^^^^^^^ help: change this to: `article_title_slug` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
redundant clone: src/appv2/features/comment/repositories.rs#L75
warning: redundant clone --> src/appv2/features/comment/repositories.rs:75:27 | 75 | body: body.to_string(), | ^^^^^^^^^^^^ help: remove this | note: this value is dropped without further use --> src/appv2/features/comment/repositories.rs:75:23 | 75 | body: body.to_string(), | ^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
redundant clone: src/appv2/features/comment/repositories.rs#L68
warning: redundant clone --> src/appv2/features/comment/repositories.rs:68:41 | 68 | slug: article_title_slug.to_owned(), | ^^^^^^^^^^^ help: remove this | note: this value is dropped without further use --> src/appv2/features/comment/repositories.rs:68:23 | 68 | slug: article_title_slug.to_owned(), | ^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
methods called `from_*` usually take no `self`: src/appv2/features/comment/presenters.rs#L104
warning: methods called `from_*` usually take no `self` --> src/appv2/features/comment/presenters.rs:104:37 | 104 | pub fn from_comment_and_profile(&self, item: (Comment, Profile)) -> 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/comment/presenters.rs#L99
warning: methods called `from_*` usually take no `self` --> src/appv2/features/comment/presenters.rs:99:42 | 99 | pub fn from_comment_and_profile_list(&self, list: Vec<(Comment, Profile)>) -> 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/article/usecases.rs#L52
warning: redundant clone --> src/appv2/features/article/usecases.rs:52:52 | 52 | 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:52:34 | 52 | 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#L138
warning: this let-binding has unit value --> src/appv2/features/article/presenters.rs:138:9 | 138 | 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#L133
warning: methods called `from_*` usually take no `self` --> src/appv2/features/article/presenters.rs:133:22 | 133 | 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#L129
warning: methods called `from_*` usually take no `self` --> src/appv2/features/article/presenters.rs:129:32 | 129 | 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
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 } | ^^^^ | = note: `#[warn(deprecated)]` on by default
unused imports: `ArticleRepositoryImpl`, `FetchArticleRepositoryInput`: src/appv2/features/comment/usecases.rs#L2
warning: unused imports: `ArticleRepositoryImpl`, `FetchArticleRepositoryInput` --> src/appv2/features/comment/usecases.rs:2:5 | 2 | ArticleRepositoryImpl, FetchArticleRepositoryInput, | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `diesel::pg::PgConnection`: src/appv2/features/article/repositories.rs#L347
warning: unused import: `diesel::pg::PgConnection` --> src/appv2/features/article/repositories.rs:347:13 | 347 | use diesel::pg::PgConnection; | ^^^^^^^^^^^^^^^^^^^^^^^^
the item `PgConnection` is imported redundantly: src/appv2/features/article/repositories.rs#L347
warning: the item `PgConnection` is imported redundantly --> src/appv2/features/article/repositories.rs:347:13 | 8 | use diesel::PgConnection; | -------------------- the item `PgConnection` is already imported here ... 347 | use diesel::pg::PgConnection; | ^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `tags`: src/appv2/features/article/repositories.rs#L346
warning: unused import: `tags` --> src/appv2/features/article/repositories.rs:346:39 | 346 | use crate::schema::{articles, tags, users}; | ^^^^
unused import: `crate::error::AppError`: src/appv2/features/article/repositories.rs#L343
warning: unused import: `crate::error::AppError` --> src/appv2/features/article/repositories.rs:343:13 | 343 | use crate::error::AppError; | ^^^^^^^^^^^^^^^^^^^^^^
the item `AppError` is imported redundantly: src/appv2/features/article/repositories.rs#L343
warning: the item `AppError` is imported redundantly --> src/appv2/features/article/repositories.rs:343:13 | 6 | use crate::error::AppError; | ---------------------- the item `AppError` is already imported here ... 343 | use crate::error::AppError; | ^^^^^^^^^^^^^^^^^^^^^^
the item `User` is imported redundantly: src/appv2/features/article/repositories.rs#L342
warning: the item `User` is imported redundantly --> src/appv2/features/article/repositories.rs:342:13 | 5 | use crate::appv2::features::user::entities::User; | -------------------------------------------- the item `User` is already imported here ... 342 | use crate::appv2::features::user::entities::User; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `Tag` is imported redundantly: src/appv2/features/article/repositories.rs#L341
warning: the item `Tag` is imported redundantly --> src/appv2/features/article/repositories.rs:341:13 | 4 | use crate::appv2::features::tag::entities::{CreateTag, Tag}; | --- the item `Tag` is already imported here ... 341 | use crate::appv2::features::tag::entities::Tag; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `Profile` is imported redundantly: src/appv2/features/article/repositories.rs#L340
warning: the item `Profile` is imported redundantly --> src/appv2/features/article/repositories.rs:340:13 | 3 | use crate::appv2::features::profile::entities::Profile; | -------------------------------------------------- the item `Profile` is already imported here ... 340 | use crate::appv2::features::profile::entities::Profile; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `FavoriteInfo` is imported redundantly: src/appv2/features/article/repositories.rs#L338
warning: the item `FavoriteInfo` is imported redundantly --> src/appv2/features/article/repositories.rs:338:68 | 2 | use crate::appv2::features::favorite::entities::FavoriteInfo; | -------------------------------------------------------- the item `FavoriteInfo` is already imported here ... 338 | use crate::appv2::features::favorite::entities::{Favorite, FavoriteInfo}; | ^^^^^^^^^^^^
unused import: `Favorite`: src/appv2/features/article/repositories.rs#L338
warning: unused import: `Favorite` --> src/appv2/features/article/repositories.rs:338:58 | 338 | use crate::appv2::features::favorite::entities::{Favorite, FavoriteInfo}; | ^^^^^^^^
the item `Article` is imported redundantly: src/appv2/features/article/repositories.rs#L337
warning: the item `Article` is imported redundantly --> src/appv2/features/article/repositories.rs:337:13 | 1 | use super::entities::{Article, CreateArticle, DeleteArticle, UpdateArticle}; | ------- the item `Article` is already imported here ... 337 | use crate::appv2::features::article::entities::Article; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `diesel::prelude::*`: src/appv2/features/article/repositories.rs#L89
warning: unused import: `diesel::prelude::*` --> src/appv2/features/article/repositories.rs:89:13 | 89 | use diesel::prelude::*; | ^^^^^^^^^^^^^^^^^^
unused import: `diesel::pg::PgConnection`: src/appv2/features/article/repositories.rs#L87
warning: unused import: `diesel::pg::PgConnection` --> src/appv2/features/article/repositories.rs:87:13 | 87 | use diesel::pg::PgConnection; | ^^^^^^^^^^^^^^^^^^^^^^^^
the item `PgConnection` is imported redundantly: src/appv2/features/article/repositories.rs#L87
warning: the item `PgConnection` is imported redundantly --> src/appv2/features/article/repositories.rs:87:13 | 8 | use diesel::PgConnection; | -------------------- the item `PgConnection` is already imported here ... 87 | use diesel::pg::PgConnection; | ^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `crate::schema::articles::dsl::*`: src/appv2/features/article/repositories.rs#L85
warning: unused import: `crate::schema::articles::dsl::*` --> src/appv2/features/article/repositories.rs:85:13 | 85 | use crate::schema::articles::dsl::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `crate::error::AppError`: src/appv2/features/article/repositories.rs#L84
warning: unused import: `crate::error::AppError` --> src/appv2/features/article/repositories.rs:84:13 | 84 | use crate::error::AppError; | ^^^^^^^^^^^^^^^^^^^^^^
the item `AppError` is imported redundantly: src/appv2/features/article/repositories.rs#L84
warning: the item `AppError` is imported redundantly --> src/appv2/features/article/repositories.rs:84:13 | 6 | use crate::error::AppError; | ---------------------- the item `AppError` is already imported here ... 84 | use crate::error::AppError; | ^^^^^^^^^^^^^^^^^^^^^^
the item `User` is imported redundantly: src/appv2/features/article/repositories.rs#L83
warning: the item `User` is imported redundantly --> src/appv2/features/article/repositories.rs:83:13 | 5 | use crate::appv2::features::user::entities::User; | -------------------------------------------- the item `User` is already imported here ... 83 | use crate::appv2::features::user::entities::User; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `Tag` is imported redundantly: src/appv2/features/article/repositories.rs#L82
warning: the item `Tag` is imported redundantly --> src/appv2/features/article/repositories.rs:82:13 | 4 | use crate::appv2::features::tag::entities::{CreateTag, Tag}; | --- the item `Tag` is already imported here ... 82 | use crate::appv2::features::tag::entities::Tag; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `Profile` is imported redundantly: src/appv2/features/article/repositories.rs#L81
warning: the item `Profile` is imported redundantly --> src/appv2/features/article/repositories.rs:81:13 | 3 | use crate::appv2::features::profile::entities::Profile; | -------------------------------------------------- the item `Profile` is already imported here ... 81 | use crate::appv2::features::profile::entities::Profile; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `crate::appv2::features::follow::entities::Follow`: src/appv2/features/article/repositories.rs#L80
warning: unused import: `crate::appv2::features::follow::entities::Follow` --> src/appv2/features/article/repositories.rs:80:13 | 80 | use crate::appv2::features::follow::entities::Follow; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `FavoriteInfo` is imported redundantly: src/appv2/features/article/repositories.rs#L79
warning: the item `FavoriteInfo` is imported redundantly --> src/appv2/features/article/repositories.rs:79:68 | 2 | use crate::appv2::features::favorite::entities::FavoriteInfo; | -------------------------------------------------------- the item `FavoriteInfo` is already imported here ... 79 | use crate::appv2::features::favorite::entities::{Favorite, FavoriteInfo}; | ^^^^^^^^^^^^
the item `Article` is imported redundantly: src/appv2/features/article/repositories.rs#L78
warning: the item `Article` is imported redundantly --> src/appv2/features/article/repositories.rs:78:13 | 1 | use super::entities::{Article, CreateArticle, DeleteArticle, UpdateArticle}; | ------- the item `Article` is already imported here ... 78 | use crate::appv2::features::article::entities::Article; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `HttpResponse`: src/appv2/features/article/controllers.rs#L14
warning: unused import: `HttpResponse` --> src/appv2/features/article/controllers.rs:14:35 | 14 | 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/.