@@ -73,7 +73,7 @@ impl Database for Mysql {
73
73
74
74
// rollback transaction on error
75
75
if let Err ( e) = insert_user_auth_result {
76
- let _ = tx. rollback ( ) . await ;
76
+ drop ( tx. rollback ( ) . await ) ;
77
77
return Err ( e) ;
78
78
}
79
79
@@ -100,11 +100,11 @@ impl Database for Mysql {
100
100
// commit or rollback transaction and return user_id on success
101
101
match insert_user_profile_result {
102
102
Ok ( _) => {
103
- let _ = tx. commit ( ) . await ;
103
+ drop ( tx. commit ( ) . await ) ;
104
104
Ok ( i64:: overflowing_add_unsigned ( 0 , user_id) . 0 )
105
105
}
106
106
Err ( e) => {
107
- let _ = tx. rollback ( ) . await ;
107
+ drop ( tx. rollback ( ) . await ) ;
108
108
Err ( e)
109
109
}
110
110
}
@@ -497,7 +497,7 @@ impl Database for Mysql {
497
497
498
498
// rollback transaction on error
499
499
if let Err ( e) = insert_torrent_files_result {
500
- let _ = tx. rollback ( ) . await ;
500
+ drop ( tx. rollback ( ) . await ) ;
501
501
return Err ( e) ;
502
502
}
503
503
@@ -531,7 +531,7 @@ impl Database for Mysql {
531
531
532
532
// rollback transaction on error
533
533
if let Err ( e) = insert_torrent_announce_urls_result {
534
- let _ = tx. rollback ( ) . await ;
534
+ drop ( tx. rollback ( ) . await ) ;
535
535
return Err ( e) ;
536
536
}
537
537
@@ -558,11 +558,11 @@ impl Database for Mysql {
558
558
// commit or rollback transaction and return user_id on success
559
559
match insert_torrent_info_result {
560
560
Ok ( _) => {
561
- let _ = tx. commit ( ) . await ;
561
+ drop ( tx. commit ( ) . await ) ;
562
562
Ok ( torrent_id)
563
563
}
564
564
Err ( e) => {
565
- let _ = tx. rollback ( ) . await ;
565
+ drop ( tx. rollback ( ) . await ) ;
566
566
Err ( e)
567
567
}
568
568
}
0 commit comments