File tree Expand file tree Collapse file tree 8 files changed +10
-10
lines changed
Expand file tree Collapse file tree 8 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ impl Configuration {
318318 warn ! ( "No config file found. Creating default config file ..." ) ;
319319
320320 let config = Configuration :: default ( ) ;
321- let _ = config. save_to_file ( config_path) . await ;
321+ let ( ) = config. save_to_file ( config_path) . await ;
322322
323323 return Err ( ConfigError :: Message ( format ! (
324324 "No config file found. Created default config file in {config_path}. Edit the file and start the application."
Original file line number Diff line number Diff line change @@ -510,7 +510,7 @@ impl Database for Mysql {
510510 let announce_urls = announce_urls. iter ( ) . flatten ( ) . collect :: < Vec < & String > > ( ) ;
511511
512512 for tracker_url in & announce_urls {
513- let _ = query ( "INSERT INTO torrust_torrent_announce_urls (torrent_id, tracker_url) VALUES (?, ?)" )
513+ let ( ) = query ( "INSERT INTO torrust_torrent_announce_urls (torrent_id, tracker_url) VALUES (?, ?)" )
514514 . bind ( torrent_id)
515515 . bind ( tracker_url)
516516 . execute ( & mut tx)
Original file line number Diff line number Diff line change @@ -498,7 +498,7 @@ impl Database for Sqlite {
498498 let announce_urls = announce_urls. iter ( ) . flatten ( ) . collect :: < Vec < & String > > ( ) ;
499499
500500 for tracker_url in & announce_urls {
501- let _ = query ( "INSERT INTO torrust_torrent_announce_urls (torrent_id, tracker_url) VALUES (?, ?)" )
501+ let ( ) = query ( "INSERT INTO torrust_torrent_announce_urls (torrent_id, tracker_url) VALUES (?, ?)" )
502502 . bind ( torrent_id)
503503 . bind ( tracker_url)
504504 . execute ( & mut tx)
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ impl Service {
6565 }
6666
6767 match self . category_repository . delete ( category_name) . await {
68- Ok ( _ ) => Ok ( ( ) ) ,
68+ Ok ( ( ) ) => Ok ( ( ) ) ,
6969 Err ( e) => match e {
7070 DatabaseError :: CategoryNotFound => Err ( ServiceError :: CategoryNotFound ) ,
7171 _ => Err ( ServiceError :: DatabaseError ) ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ impl Service {
3939 }
4040
4141 match self . tag_repository . add ( tag_name) . await {
42- Ok ( _ ) => Ok ( ( ) ) ,
42+ Ok ( ( ) ) => Ok ( ( ) ) ,
4343 Err ( e) => match e {
4444 DatabaseError :: TagAlreadyExists => Err ( ServiceError :: TagAlreadyExists ) ,
4545 _ => Err ( ServiceError :: DatabaseError ) ,
@@ -65,7 +65,7 @@ impl Service {
6565 }
6666
6767 match self . tag_repository . delete ( tag_id) . await {
68- Ok ( _ ) => Ok ( ( ) ) ,
68+ Ok ( ( ) ) => Ok ( ( ) ) ,
6969 Err ( e) => match e {
7070 DatabaseError :: TagNotFound => Err ( ServiceError :: TagNotFound ) ,
7171 _ => Err ( ServiceError :: DatabaseError ) ,
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ pub async fn delete_handler(
8181 } ;
8282
8383 match app_data. category_service . delete_category ( & category_form. name , & user_id) . await {
84- Ok ( _ ) => deleted_category ( & category_form. name ) . into_response ( ) ,
84+ Ok ( ( ) ) => deleted_category ( & category_form. name ) . into_response ( ) ,
8585 Err ( error) => error. into_response ( ) ,
8686 }
8787}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ pub async fn add_handler(
5252 } ;
5353
5454 match app_data. tag_service . add_tag ( & add_tag_form. name , & user_id) . await {
55- Ok ( _ ) => added_tag ( & add_tag_form. name ) . into_response ( ) ,
55+ Ok ( ( ) ) => added_tag ( & add_tag_form. name ) . into_response ( ) ,
5656 Err ( error) => error. into_response ( ) ,
5757 }
5858}
@@ -77,7 +77,7 @@ pub async fn delete_handler(
7777 } ;
7878
7979 match app_data. tag_service . delete_tag ( & delete_tag_form. tag_id , & user_id) . await {
80- Ok ( _ ) => deleted_tag ( delete_tag_form. tag_id ) . into_response ( ) ,
80+ Ok ( ( ) ) => deleted_tag ( delete_tag_form. tag_id ) . into_response ( ) ,
8181 Err ( error) => error. into_response ( ) ,
8282 }
8383}
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ pub async fn ban_handler(
145145 } ;
146146
147147 match app_data. ban_service . ban_user ( & to_be_banned_username. 0 , & user_id) . await {
148- Ok ( _ ) => Json ( OkResponseData {
148+ Ok ( ( ) ) => Json ( OkResponseData {
149149 data : format ! ( "Banned user: {}" , to_be_banned_username. 0 ) ,
150150 } )
151151 . into_response ( ) ,
You can’t perform that action at this time.
0 commit comments