Upgrade/clean arch #71
clippy
23 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 23 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.69.0 (84c898d65 2023-04-16)
- cargo 1.69.0 (6e9a83356 2023-04-12)
- clippy 0.1.69 (84c898d 2023-04-16)
Annotations
Check warning on line 41 in src/appv2/features/user/presenters.rs
github-actions / clippy
methods called `from_*` usually take no `self`
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
Check warning on line 24 in src/appv2/features/tag/presenters.rs
github-actions / clippy
methods called `from_*` usually take no `self`
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
Check warning on line 37 in src/appv2/features/profile/presenters.rs
github-actions / clippy
methods called `from_*` usually take no `self`
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
Check warning on line 130 in src/appv2/features/article/presenters.rs
github-actions / clippy
methods called `from_*` usually take no `self`
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
Check warning on line 5 in src/appv2/features/tag/repositories.rs
github-actions / clippy
type alias `Token` is never used
warning: type alias `Token` is never used
--> src/appv2/features/tag/repositories.rs:5:6
|
5 | type Token = String;
| ^^^^^
Check warning on line 5 in src/appv2/features/article/repositories.rs
github-actions / clippy
type alias `ArticleCount` is never used
warning: type alias `ArticleCount` is never used
--> src/appv2/features/article/repositories.rs:5:6
|
5 | type ArticleCount = i64;
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 21 in src/appv2/features/profile/services.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
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(),
| ^^^^^^^^^^^
Check warning on line 20 in src/appv2/features/profile/services.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
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(),
| ^^^^^^^^^^^
Check warning on line 19 in src/appv2/features/profile/services.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
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(),
| ^^^^^^^^^^^
Check warning on line 14 in src/appv2/features/profile/services.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
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),
| ^^^^^^^^^^^
Check warning on line 13 in src/appv2/features/profile/services.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::current_user`: use repository
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() {
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 23 in src/appv2/drivers/middlewares/state.rs
github-actions / clippy
use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`
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()?;
| ^^^^^^^^^
Check warning on line 19 in src/appv2/drivers/middlewares/state.rs
github-actions / clippy
use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`
warning: use of deprecated field `appv2::drivers::middlewares::state::AppState::pool`
--> src/appv2/drivers/middlewares/state.rs:19:16
|
19 | Self { pool, di_container }
| ^^^^
Check warning on line 62 in src/app/comment/service.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::current_user`: use repository
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 });
| ^^^^^^^^^^^^
Check warning on line 62 in src/app/comment/service.rs
github-actions / clippy
use of deprecated field `appv2::features::profile::services::ConverUserToProfile::user`: use repository
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 });
| ^^^^
Check warning on line 12 in src/appv2/features/profile/services.rs
github-actions / clippy
use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository
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 {
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 42 in src/appv2/features/favorite/repositories.rs
github-actions / clippy
use of deprecated function `appv2::features::favorite::services::unfavorite`: use repository instead
warning: use of deprecated function `appv2::features::favorite::services::unfavorite`: use repository instead
--> src/appv2/features/favorite/repositories.rs:42:70
|
42 | let (article, profile, favorite_info, tags_list) = services::unfavorite(
| ^^^^^^^^^^
Check warning on line 26 in src/appv2/features/favorite/repositories.rs
github-actions / clippy
use of deprecated function `appv2::features::favorite::services::favorite`: use repository instead
warning: use of deprecated function `appv2::features::favorite::services::favorite`: use repository instead
--> src/appv2/features/favorite/repositories.rs:26:70
|
26 | let (article, profile, favorite_info, tags_list) = services::favorite(
| ^^^^^^^^
Check warning on line 62 in src/app/comment/service.rs
github-actions / clippy
use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository
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 });
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 62 in src/app/comment/service.rs
github-actions / clippy
use of deprecated function `appv2::features::profile::services::conver_user_to_profile`: use repository
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 });
| ^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 4 in src/app/comment/service.rs
github-actions / clippy
use of deprecated struct `appv2::features::profile::services::ConverUserToProfile`: use repository
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};
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 4 in src/app/comment/service.rs
github-actions / clippy
use of deprecated function `appv2::features::profile::services::conver_user_to_profile`: use repository
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
Check warning on line 7 in src/appv2/features/favorite/usecases.rs
github-actions / clippy
unused import: `uuid::Uuid`
warning: unused import: `uuid::Uuid`
--> src/appv2/features/favorite/usecases.rs:7:5
|
7 | use uuid::Uuid;
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default