Skip to content

Commit

Permalink
dev: fix clippy warnings for: src/models/response.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed May 10, 2023
1 parent b737f10 commit eb3dd11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/models/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,33 @@ pub enum OkResponses {
TokenResponse(TokenResponse),
}

#[allow(clippy::module_name_repetitions)]
#[derive(Serialize, Deserialize, Debug)]
pub struct OkResponse<T> {
pub data: T,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Serialize, Deserialize, Debug)]
pub struct ErrorResponse<T> {
pub errors: Vec<T>,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Serialize, Deserialize, Debug)]
pub struct TokenResponse {
pub token: String,
pub username: String,
pub admin: bool,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Serialize, Deserialize, Debug)]
pub struct NewTorrentResponse {
pub torrent_id: i64,
}

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow)]
pub struct TorrentResponse {
pub torrent_id: i64,
Expand Down Expand Up @@ -72,6 +77,7 @@ impl TorrentResponse {
}
}

#[allow(clippy::module_name_repetitions)]
#[derive(Serialize, Deserialize, Debug, sqlx::FromRow)]
pub struct TorrentsResponse {
pub total: u32,
Expand Down

0 comments on commit eb3dd11

Please sign in to comment.