Skip to content

Upgrade/clean arch

Upgrade/clean arch #76

Triggered via pull request June 12, 2023 03:33
Status Success
Total duration 7m 31s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

30 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
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, &params.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 imports: `Article`, `DeleteArticle`, `SingleArticleResponse`: src/appv2/features/article/controllers.rs#L2
warning: unused imports: `Article`, `DeleteArticle`, `SingleArticleResponse` --> src/appv2/features/article/controllers.rs:2:16 | 2 | entities::{Article, DeleteArticle}, | ^^^^^^^ ^^^^^^^^^^^^^ 3 | presenters::{MultipleArticlesResponse, SingleArticleResponse}, | ^^^^^^^^^^^^^^^^^^^^^ | = 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/.