fix: update readme #89
Annotations
47 warnings
unused `std::result::Result` that must be used:
src/app/features/comment/usecases.rs#L51
warning: unused `std::result::Result` that must be used
--> src/app/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
|
trait method `toHttpRes` should have a snake case name:
src/app/features/comment/presenters.rs#L82
warning: trait method `toHttpRes` should have a snake case name
--> src/app/features/comment/presenters.rs:82:8
|
82 | fn toHttpRes(&self) -> HttpResponse;
| ^^^^^^^^^ help: convert the identifier to snake case: `to_http_res`
|
trait method `toHttpRes` should have a snake case name:
src/app/features/article/presenters.rs#L126
warning: trait method `toHttpRes` should have a snake case name
--> src/app/features/article/presenters.rs:126:8
|
126 | 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/app/features/user/presenters.rs#L36
warning: methods called `from_*` usually take no `self`
--> src/app/features/user/presenters.rs:36:28
|
36 | 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/app/features/tag/presenters.rs#L19
warning: methods called `from_*` usually take no `self`
--> src/app/features/tag/presenters.rs:19:18
|
19 | 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/app/features/profile/presenters.rs#L32
warning: methods called `from_*` usually take no `self`
--> src/app/features/profile/presenters.rs:32:21
|
32 | 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/app/features/favorite/repositories.rs#L49
warning: redundant clone
--> src/app/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/app/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/app/features/favorite/repositories.rs#L29
warning: redundant clone
--> src/app/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/app/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/app/features/comment/usecases.rs#L52
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/app/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/app/features/comment/repositories.rs#L95
warning: redundant clone
--> src/app/features/comment/repositories.rs:95:27
|
95 | body: body.to_string(),
| ^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> src/app/features/comment/repositories.rs:95:23
|
95 | body: body.to_string(),
| ^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
redundant clone:
src/app/features/comment/repositories.rs#L88
warning: redundant clone
--> src/app/features/comment/repositories.rs:88:41
|
88 | slug: article_title_slug.to_owned(),
| ^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> src/app/features/comment/repositories.rs:88:23
|
88 | 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/app/features/comment/presenters.rs#L84
warning: methods called `from_*` usually take no `self`
--> src/app/features/comment/presenters.rs:84:38
|
84 | 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
|
methods called `from_*` usually take no `self`:
src/app/features/comment/presenters.rs#L83
warning: methods called `from_*` usually take no `self`
--> src/app/features/comment/presenters.rs:83:33
|
83 | 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
|
redundant clone:
src/app/features/article/usecases.rs#L52
warning: redundant clone
--> src/app/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/app/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/app/features/article/presenters.rs#L146
warning: this let-binding has unit value
--> src/app/features/article/presenters.rs:146:9
|
146 | 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/app/features/article/presenters.rs#L125
warning: methods called `from_*` usually take no `self`
--> src/app/features/article/presenters.rs:125:18
|
125 | 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/app/features/article/presenters.rs#L124
warning: methods called `from_*` usually take no `self`
--> src/app/features/article/presenters.rs:124:28
|
124 | 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
|
use of deprecated field `app::drivers::middlewares::state::AppState::pool`:
src/app/drivers/middlewares/state.rs#L23
warning: use of deprecated field `app::drivers::middlewares::state::AppState::pool`
--> src/app/drivers/middlewares/state.rs:23:20
|
23 | let conn = self.pool.get()?;
| ^^^^^^^^^
|
use of deprecated field `app::drivers::middlewares::state::AppState::pool`:
src/app/drivers/middlewares/state.rs#L19
warning: use of deprecated field `app::drivers::middlewares::state::AppState::pool`
--> src/app/drivers/middlewares/state.rs:19:16
|
19 | Self { pool, di_container }
| ^^^^
|
= note: `#[warn(deprecated)]` on by default
|
unused import: `diesel::pg::PgConnection`:
src/app/features/article/repositories.rs#L347
warning: unused import: `diesel::pg::PgConnection`
--> src/app/features/article/repositories.rs:347:13
|
347 | use diesel::pg::PgConnection;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `PgConnection` is imported redundantly:
src/app/features/article/repositories.rs#L347
warning: the item `PgConnection` is imported redundantly
--> src/app/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/app/features/article/repositories.rs#L346
warning: unused import: `tags`
--> src/app/features/article/repositories.rs:346:39
|
346 | use crate::schema::{articles, tags, users};
| ^^^^
|
unused import: `crate::error::AppError`:
src/app/features/article/repositories.rs#L343
warning: unused import: `crate::error::AppError`
--> src/app/features/article/repositories.rs:343:13
|
343 | use crate::error::AppError;
| ^^^^^^^^^^^^^^^^^^^^^^
|
the item `AppError` is imported redundantly:
src/app/features/article/repositories.rs#L343
warning: the item `AppError` is imported redundantly
--> src/app/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/app/features/article/repositories.rs#L342
warning: the item `User` is imported redundantly
--> src/app/features/article/repositories.rs:342:13
|
5 | use crate::app::features::user::entities::User;
| ------------------------------------------ the item `User` is already imported here
...
342 | use crate::app::features::user::entities::User;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Tag` is imported redundantly:
src/app/features/article/repositories.rs#L341
warning: the item `Tag` is imported redundantly
--> src/app/features/article/repositories.rs:341:13
|
4 | use crate::app::features::tag::entities::{CreateTag, Tag};
| --- the item `Tag` is already imported here
...
341 | use crate::app::features::tag::entities::Tag;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Profile` is imported redundantly:
src/app/features/article/repositories.rs#L340
warning: the item `Profile` is imported redundantly
--> src/app/features/article/repositories.rs:340:13
|
3 | use crate::app::features::profile::entities::Profile;
| ------------------------------------------------ the item `Profile` is already imported here
...
340 | use crate::app::features::profile::entities::Profile;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `FavoriteInfo` is imported redundantly:
src/app/features/article/repositories.rs#L338
warning: the item `FavoriteInfo` is imported redundantly
--> src/app/features/article/repositories.rs:338:66
|
2 | use crate::app::features::favorite::entities::FavoriteInfo;
| ------------------------------------------------------ the item `FavoriteInfo` is already imported here
...
338 | use crate::app::features::favorite::entities::{Favorite, FavoriteInfo};
| ^^^^^^^^^^^^
|
unused import: `Favorite`:
src/app/features/article/repositories.rs#L338
warning: unused import: `Favorite`
--> src/app/features/article/repositories.rs:338:56
|
338 | use crate::app::features::favorite::entities::{Favorite, FavoriteInfo};
| ^^^^^^^^
|
the item `Article` is imported redundantly:
src/app/features/article/repositories.rs#L337
warning: the item `Article` is imported redundantly
--> src/app/features/article/repositories.rs:337:13
|
1 | use super::entities::{Article, CreateArticle, DeleteArticle, UpdateArticle};
| ------- the item `Article` is already imported here
...
337 | use crate::app::features::article::entities::Article;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `diesel::prelude::*`:
src/app/features/article/repositories.rs#L89
warning: unused import: `diesel::prelude::*`
--> src/app/features/article/repositories.rs:89:13
|
89 | use diesel::prelude::*;
| ^^^^^^^^^^^^^^^^^^
|
unused import: `diesel::pg::PgConnection`:
src/app/features/article/repositories.rs#L87
warning: unused import: `diesel::pg::PgConnection`
--> src/app/features/article/repositories.rs:87:13
|
87 | use diesel::pg::PgConnection;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `PgConnection` is imported redundantly:
src/app/features/article/repositories.rs#L87
warning: the item `PgConnection` is imported redundantly
--> src/app/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/app/features/article/repositories.rs#L85
warning: unused import: `crate::schema::articles::dsl::*`
--> src/app/features/article/repositories.rs:85:13
|
85 | use crate::schema::articles::dsl::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::error::AppError`:
src/app/features/article/repositories.rs#L84
warning: unused import: `crate::error::AppError`
--> src/app/features/article/repositories.rs:84:13
|
84 | use crate::error::AppError;
| ^^^^^^^^^^^^^^^^^^^^^^
|
the item `AppError` is imported redundantly:
src/app/features/article/repositories.rs#L84
warning: the item `AppError` is imported redundantly
--> src/app/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/app/features/article/repositories.rs#L83
warning: the item `User` is imported redundantly
--> src/app/features/article/repositories.rs:83:13
|
5 | use crate::app::features::user::entities::User;
| ------------------------------------------ the item `User` is already imported here
...
83 | use crate::app::features::user::entities::User;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Tag` is imported redundantly:
src/app/features/article/repositories.rs#L82
warning: the item `Tag` is imported redundantly
--> src/app/features/article/repositories.rs:82:13
|
4 | use crate::app::features::tag::entities::{CreateTag, Tag};
| --- the item `Tag` is already imported here
...
82 | use crate::app::features::tag::entities::Tag;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `Profile` is imported redundantly:
src/app/features/article/repositories.rs#L81
warning: the item `Profile` is imported redundantly
--> src/app/features/article/repositories.rs:81:13
|
3 | use crate::app::features::profile::entities::Profile;
| ------------------------------------------------ the item `Profile` is already imported here
...
81 | use crate::app::features::profile::entities::Profile;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::app::features::follow::entities::Follow`:
src/app/features/article/repositories.rs#L80
warning: unused import: `crate::app::features::follow::entities::Follow`
--> src/app/features/article/repositories.rs:80:13
|
80 | use crate::app::features::follow::entities::Follow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
the item `FavoriteInfo` is imported redundantly:
src/app/features/article/repositories.rs#L79
warning: the item `FavoriteInfo` is imported redundantly
--> src/app/features/article/repositories.rs:79:66
|
2 | use crate::app::features::favorite::entities::FavoriteInfo;
| ------------------------------------------------------ the item `FavoriteInfo` is already imported here
...
79 | use crate::app::features::favorite::entities::{Favorite, FavoriteInfo};
| ^^^^^^^^^^^^
|
the item `Article` is imported redundantly:
src/app/features/article/repositories.rs#L78
warning: the item `Article` is imported redundantly
--> src/app/features/article/repositories.rs:78:13
|
1 | use super::entities::{Article, CreateArticle, DeleteArticle, UpdateArticle};
| ------- the item `Article` is already imported here
...
78 | use crate::app::features::article::entities::Article;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `HttpResponse`:
src/app/features/article/controllers.rs#L14
warning: unused import: `HttpResponse`
--> src/app/features/article/controllers.rs:14:35
|
14 | use actix_web::{web, HttpRequest, HttpResponse};
| ^^^^^^^^^^^^
|
unused imports: `Article`, `DeleteArticle`, `MultipleArticlesResponse`, `SingleArticleResponse`, `repositories::FetchFollowingArticlesRepositoryInput`:
src/app/features/article/controllers.rs#L2
warning: unused imports: `Article`, `DeleteArticle`, `MultipleArticlesResponse`, `SingleArticleResponse`, `repositories::FetchFollowingArticlesRepositoryInput`
--> src/app/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/.
|