Skip to content

Commit 967bd9c

Browse files
author
Glubus
committed
refactor: make clippy happy :)
1 parent a92eff6 commit 967bd9c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/models/failed_query/impl.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@ use sqlx::{Error as SqlxError, PgPool};
44

55
impl FailedQueryRow {
66
pub async fn insert(pool: &PgPool, hash: &str) -> Result<i32, SqlxError> {
7-
let result = insert(pool, hash).await?;
8-
Ok(result)
7+
insert(pool, hash).await
98
}
109

1110
pub async fn exists_by_hash(pool: &PgPool, hash: &str) -> Result<bool, SqlxError> {
12-
let result = exists_by_hash(pool, hash).await?;
13-
Ok(result)
11+
exists_by_hash(pool, hash).await
1412
}
1513

1614
pub async fn find_by_id(pool: &PgPool, id: i32) -> Result<Self, SqlxError> {
17-
let result = find_by_id(pool, id).await?;
18-
Ok(result.ok_or(SqlxError::RowNotFound)?)
15+
find_by_id(pool, id).await?.ok_or(SqlxError::RowNotFound)
16+
1917
}
2018

2119
pub async fn delete_by_hash(pool: &PgPool, hash: &str) -> Result<u64, SqlxError> {
22-
let result = delete_by_hash(pool, hash).await?;
23-
Ok(result)
20+
delete_by_hash(pool, hash).await
2421
}
2522
}

0 commit comments

Comments
 (0)