File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,19 @@ use sqlx::{Error as SqlxError, PgPool};
44
55impl 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}
You can’t perform that action at this time.
0 commit comments