@@ -441,7 +441,7 @@ pub fn handle_command_execution_result<T: Formatter>(
441441 )
442442 }
443443 _ => {
444- error ! ( "Error occurred: {:?}" , e ) ;
444+ error ! ( "Error occurred: {e :?}" ) ;
445445 }
446446 }
447447 std:: process:: exit ( 1 ) ;
@@ -511,7 +511,7 @@ pub fn handle_cli(cli: &Cli) {
511511 std:: process:: exit ( 1 ) ;
512512 }
513513 _ => {
514- error ! ( "Error occurred: {:?}" , e ) ;
514+ error ! ( "Error occurred: {e :?}" ) ;
515515 std:: process:: exit ( 1 ) ;
516516 }
517517 } ,
@@ -538,7 +538,7 @@ fn get_user_input() -> String {
538538 match stdin. read_line ( & mut user_input) {
539539 Ok ( _) => { }
540540 Err ( e) => {
541- error ! ( "Error occurred: {}" , e ) ;
541+ error ! ( "Error occurred: {e}" ) ;
542542 std:: process:: exit ( 1 ) ;
543543 }
544544 }
@@ -563,15 +563,15 @@ pub fn handle_cli_screen_command(command: &ScreenCommands) {
563563 ScreenCommands :: Delete { uuid } => {
564564 match get_screen_name ( uuid, & screen_command) {
565565 Ok ( name) => {
566- info ! ( "You are about to delete the screen named \" {}\" . This operation cannot be reversed." , name ) ;
566+ info ! ( "You are about to delete the screen named \" {name }\" . This operation cannot be reversed." ) ;
567567 info ! ( "Enter the screen name to confirm the screen deletion: " ) ;
568568 if name != get_user_input ( ) {
569569 error ! ( "The name you entered is incorrect. Aborting." ) ;
570570 std:: process:: exit ( 1 ) ;
571571 }
572572 }
573573 Err ( e) => {
574- error ! ( "Error occurred: {}" , e ) ;
574+ error ! ( "Error occurred: {e}" ) ;
575575 std:: process:: exit ( 1 ) ;
576576 }
577577 }
@@ -582,7 +582,7 @@ pub fn handle_cli_screen_command(command: &ScreenCommands) {
582582 std:: process:: exit ( 0 ) ;
583583 }
584584 Err ( e) => {
585- error ! ( "Error occurred: {:?}" , e ) ;
585+ error ! ( "Error occurred: {e :?}" ) ;
586586 std:: process:: exit ( 1 ) ;
587587 }
588588 }
@@ -612,7 +612,7 @@ pub fn handle_cli_playlist_command(command: &PlaylistCommands) {
612612 match playlist_file {
613613 Ok ( playlist) => {
614614 let pretty_playlist_file = serde_json:: to_string_pretty ( & playlist) . unwrap ( ) ;
615- println ! ( "{}" , pretty_playlist_file ) ;
615+ println ! ( "{pretty_playlist_file}" ) ;
616616 }
617617 Err ( e) => {
618618 eprintln ! ( "Error occurred when getting playlist: {e:?}" )
@@ -694,7 +694,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
694694 AssetCommands :: Delete { uuid } => {
695695 match get_asset_title ( uuid, & asset_command) {
696696 Ok ( title) => {
697- info ! ( "You are about to delete the asset named \" {}\" . This operation cannot be reversed." , title ) ;
697+ info ! ( "You are about to delete the asset named \" {title }\" . This operation cannot be reversed." ) ;
698698 info ! ( "Enter the asset title to confirm the asset deletion: " ) ;
699699 io:: stdout ( ) . flush ( ) . unwrap ( ) ;
700700
@@ -703,7 +703,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
703703 match stdin. read_line ( & mut user_input) {
704704 Ok ( _) => { }
705705 Err ( e) => {
706- error ! ( "Error occurred: {}" , e ) ;
706+ error ! ( "Error occurred: {e}" ) ;
707707 std:: process:: exit ( 1 ) ;
708708 }
709709 }
@@ -714,7 +714,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
714714 }
715715 }
716716 Err ( e) => {
717- error ! ( "Error occurred: {}" , e ) ;
717+ error ! ( "Error occurred: {e}" ) ;
718718 std:: process:: exit ( 1 ) ;
719719 }
720720 }
@@ -724,7 +724,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
724724 std:: process:: exit ( 0 ) ;
725725 }
726726 Err ( e) => {
727- error ! ( "Error occurred: {:?}" , e ) ;
727+ error ! ( "Error occurred: {e :?}" ) ;
728728 std:: process:: exit ( 1 ) ;
729729 }
730730 }
@@ -736,21 +736,21 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
736736 match response. status ( ) {
737737 StatusCode :: OK => response. text ( ) . unwrap_or_default ( ) ,
738738 status => {
739- error ! ( "Failed to retrieve JS injection code. Wrong response status: {}" , status ) ;
739+ error ! ( "Failed to retrieve JS injection code. Wrong response status: {status}" ) ;
740740 std:: process:: exit ( 1 ) ;
741741 }
742742 }
743743 }
744744 Err ( e) => {
745- error ! ( "Failed to retrieve JS injection code. Error: {}" , e ) ;
745+ error ! ( "Failed to retrieve JS injection code. Error: {e}" ) ;
746746 std:: process:: exit ( 1 ) ;
747747 }
748748 }
749749 } else {
750750 match fs:: read_to_string ( path) {
751751 Ok ( text) => text,
752752 Err ( e) => {
753- error ! ( "Failed to read file with JS injection code. Error: {}" , e ) ;
753+ error ! ( "Failed to read file with JS injection code. Error: {e}" ) ;
754754 std:: process:: exit ( 1 ) ;
755755 }
756756 }
@@ -761,7 +761,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
761761 info ! ( "Asset updated successfully." ) ;
762762 }
763763 Err ( e) => {
764- error ! ( "Error occurred: {:?}" , e ) ;
764+ error ! ( "Error occurred: {e :?}" ) ;
765765 std:: process:: exit ( 1 ) ;
766766 }
767767 }
@@ -772,7 +772,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
772772 info ! ( "Asset updated successfully." ) ;
773773 }
774774 Err ( e) => {
775- error ! ( "Error occurred: {:?}" , e ) ;
775+ error ! ( "Error occurred: {e :?}" ) ;
776776 std:: process:: exit ( 1 ) ;
777777 }
778778 }
@@ -787,7 +787,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
787787 info ! ( "Asset updated successfully." ) ;
788788 }
789789 Err ( e) => {
790- error ! ( "Error occurred: {:?}" , e ) ;
790+ error ! ( "Error occurred: {e :?}" ) ;
791791 std:: process:: exit ( 1 ) ;
792792 }
793793 }
@@ -798,7 +798,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
798798 info ! ( "Asset updated successfully." ) ;
799799 }
800800 Err ( e) => {
801- error ! ( "Error occurred: {:?}" , e ) ;
801+ error ! ( "Error occurred: {e :?}" ) ;
802802 std:: process:: exit ( 1 ) ;
803803 }
804804 }
@@ -812,7 +812,7 @@ pub fn handle_cli_asset_command(command: &AssetCommands) {
812812 info ! ( "Asset updated successfully." ) ;
813813 }
814814 Err ( e) => {
815- error ! ( "Error occurred: {:?}" , e ) ;
815+ error ! ( "Error occurred: {e :?}" ) ;
816816 std:: process:: exit ( 1 ) ;
817817 }
818818 }
@@ -864,8 +864,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
864864 } => match edge_app_command. deploy ( path. clone ( ) , * delete_missing_settings) {
865865 Ok ( revision) => {
866866 println ! (
867- "Edge app successfully deployed. Revision: {revision}." ,
868- revision = revision
867+ "Edge app successfully deployed. Revision: {revision}."
869868 ) ;
870869 }
871870 Err ( e) => {
@@ -883,7 +882,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
883882 println ! ( "Edge app setting successfully set." ) ;
884883 }
885884 Err ( e) => {
886- eprintln ! ( "Failed to set edge app setting: {}" , e ) ;
885+ eprintln ! ( "Failed to set edge app setting: {e}" ) ;
887886 std:: process:: exit ( 1 ) ;
888887 }
889888 }
@@ -893,21 +892,21 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
893892 let actual_app_id = match edge_app_command. get_app_id ( path. clone ( ) ) {
894893 Ok ( id) => id,
895894 Err ( e) => {
896- error ! ( "Error calling delete Edge App: {}" , e ) ;
895+ error ! ( "Error calling delete Edge App: {e}" ) ;
897896 std:: process:: exit ( 1 ) ;
898897 }
899898 } ;
900899 match edge_app_command. get_app_name ( & actual_app_id) {
901900 Ok ( name) => {
902- info ! ( "You are about to delete the Edge App named \" {}\" . This operation cannot be reversed." , name ) ;
901+ info ! ( "You are about to delete the Edge App named \" {name }\" . This operation cannot be reversed." ) ;
903902 info ! ( "Enter the Edge App name to confirm the app deletion: " ) ;
904903 if name != get_user_input ( ) {
905904 error ! ( "The name you entered is incorrect. Aborting." ) ;
906905 std:: process:: exit ( 1 ) ;
907906 }
908907 }
909908 Err ( e) => {
910- error ! ( "Error occurred: {}" , e ) ;
909+ error ! ( "Error occurred: {e}" ) ;
911910 std:: process:: exit ( 1 ) ;
912911 }
913912 }
@@ -930,14 +929,14 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
930929 println ! ( "App id cleared from manifest." ) ;
931930 }
932931 Err ( e) => {
933- error ! ( "Error occurred while clearing manifest: {}" , e ) ;
932+ error ! ( "Error occurred while clearing manifest: {e}" ) ;
934933 std:: process:: exit ( 1 ) ;
935934 }
936935 }
937936 std:: process:: exit ( 0 ) ;
938937 }
939938 Err ( e) => {
940- error ! ( "Error occurred: {:?}" , e ) ;
939+ error ! ( "Error occurred: {e :?}" ) ;
941940 std:: process:: exit ( 1 ) ;
942941 }
943942 }
@@ -946,7 +945,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
946945 let actual_app_id = match edge_app_command. get_app_id ( path. clone ( ) ) {
947946 Ok ( id) => id,
948947 Err ( e) => {
949- error ! ( "Error calling delete Edge App: {}" , e ) ;
948+ error ! ( "Error calling delete Edge App: {e}" ) ;
950949 std:: process:: exit ( 1 ) ;
951950 }
952951 } ;
@@ -1071,7 +1070,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
10711070 let actual_app_id = match edge_app_command. get_app_id ( path. clone ( ) ) {
10721071 Ok ( id) => id,
10731072 Err ( e) => {
1074- error ! ( "Error calling list instances: {}" , e ) ;
1073+ error ! ( "Error calling list instances: {e}" ) ;
10751074 std:: process:: exit ( 1 ) ;
10761075 }
10771076 } ;
@@ -1084,7 +1083,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
10841083 let actual_app_id = match edge_app_command. get_app_id ( path. clone ( ) ) {
10851084 Ok ( id) => id,
10861085 Err ( e) => {
1087- error ! ( "Error calling create instance: {}" , e ) ;
1086+ error ! ( "Error calling create instance: {e}" ) ;
10881087 std:: process:: exit ( 1 ) ;
10891088 }
10901089 } ;
@@ -1121,7 +1120,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
11211120 match edge_app_command. get_installation_id ( path. clone ( ) ) {
11221121 Ok ( _installation_id) => _installation_id,
11231122 Err ( e) => {
1124- error ! ( "Error calling delete setting: {}" , e ) ;
1123+ error ! ( "Error calling delete setting: {e}" ) ;
11251124 std:: process:: exit ( 1 ) ;
11261125 }
11271126 } ;
@@ -1136,7 +1135,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
11361135 }
11371136 } ,
11381137 Err ( e) => {
1139- eprintln ! ( "Failed to delete edge app instance. {:?}" , e ) ;
1138+ eprintln ! ( "Failed to delete edge app instance. {e :?}" ) ;
11401139 std:: process:: exit ( 1 ) ;
11411140 }
11421141 } ;
@@ -1212,7 +1211,7 @@ mod tests {
12121211
12131212 assert_eq ! (
12141213 new_path,
1215- PathBuf :: from( format!( "{}/screenly.yml" , dir_path ) )
1214+ PathBuf :: from( format!( "{dir_path }/screenly.yml" ) )
12161215 ) ;
12171216 }
12181217
0 commit comments