Skip to content

Commit

Permalink
dev: fix clippy warnings for: src/models/user.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed May 10, 2023
1 parent a0947d0 commit f1b3663
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/models/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ pub struct User {
pub administrator: bool,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, Serialize, Deserialize, Clone, sqlx::FromRow)]
pub struct UserAuthentication {
pub user_id: i64,
pub password_hash: String,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone, sqlx::FromRow)]
pub struct UserProfile {
pub user_id: i64,
Expand All @@ -24,13 +26,15 @@ pub struct UserProfile {
pub avatar: String,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, Serialize, Deserialize, Clone, sqlx::FromRow)]
pub struct UserCompact {
pub user_id: i64,
pub username: String,
pub administrator: bool,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, Serialize, Deserialize, Clone, sqlx::FromRow)]
pub struct UserFull {
pub user_id: i64,
Expand All @@ -44,6 +48,7 @@ pub struct UserFull {
pub avatar: String,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct UserClaims {
pub user: UserCompact,
Expand Down

0 comments on commit f1b3663

Please sign in to comment.