@@ -361,9 +361,9 @@ pub(crate) async fn handle_online_wallet_subcommand(
361361 let mut once = HashSet :: < KeychainKind > :: new ( ) ;
362362 move |k, spk_i, _| {
363363 if once. insert ( k) {
364- print ! ( "\n Scanning keychain [{:?}]" , k ) ;
364+ print ! ( "\n Scanning keychain [{k :?}]" ) ;
365365 }
366- print ! ( " {:<3}" , spk_i ) ;
366+ print ! ( " {spk_i :<3}" ) ;
367367 stdout. flush ( ) . expect ( "must flush" ) ;
368368 }
369369 } ) ;
@@ -438,7 +438,7 @@ pub(crate) async fn handle_online_wallet_subcommand(
438438 . start_sync_with_revealed_spks ( )
439439 . inspect ( |item, progress| {
440440 let pc = ( 100 * progress. consumed ( ) ) as f32 / progress. total ( ) as f32 ;
441- eprintln ! ( "[ SCANNING {:03.0}% ] {}" , pc , item ) ;
441+ eprintln ! ( "[ SCANNING {pc :03.0}% ] {item}" ) ;
442442 } ) ;
443443 match client {
444444 #[ cfg( feature = "electrum" ) ]
@@ -564,7 +564,7 @@ pub(crate) async fn handle_online_wallet_subcommand(
564564
565565 let subscriber = tracing_subscriber:: FmtSubscriber :: new ( ) ;
566566 tracing:: subscriber:: set_global_default ( subscriber)
567- . map_err ( |e| Error :: Generic ( format ! ( "SetGlobalDefault error: {}" , e ) ) ) ?;
567+ . map_err ( |e| Error :: Generic ( format ! ( "SetGlobalDefault error: {e}" ) ) ) ?;
568568
569569 tokio:: task:: spawn ( async move { node. run ( ) . await } ) ;
570570 tokio:: task:: spawn ( async move {
@@ -584,7 +584,7 @@ pub(crate) async fn handle_online_wallet_subcommand(
584584 let txid = tx. compute_txid ( ) ;
585585 requester
586586 . broadcast_random ( tx. clone ( ) )
587- . map_err ( |e| Error :: Generic ( format ! ( "{}" , e ) ) ) ?;
587+ . map_err ( |e| Error :: Generic ( format ! ( "{e}" ) ) ) ?;
588588 tokio:: time:: timeout ( tokio:: time:: Duration :: from_secs ( 30 ) , async move {
589589 while let Some ( info) = info_subscriber. recv ( ) . await {
590590 match info {
@@ -625,8 +625,7 @@ pub(crate) fn is_final(psbt: &Psbt) -> Result<(), Error> {
625625 let psbt_inputs = psbt. inputs . len ( ) ;
626626 if unsigned_tx_inputs != psbt_inputs {
627627 return Err ( Error :: Generic ( format ! (
628- "Malformed PSBT, {} unsigned tx inputs and {} psbt inputs." ,
629- unsigned_tx_inputs, psbt_inputs
628+ "Malformed PSBT, {unsigned_tx_inputs} unsigned tx inputs and {psbt_inputs} psbt inputs."
630629 ) ) ) ;
631630 }
632631 let sig_count = psbt. inputs . iter ( ) . fold ( 0 , |count, input| {
@@ -766,7 +765,6 @@ pub(crate) async fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
766765 wallet_opts,
767766 subcommand : WalletSubCommand :: OnlineWalletSubCommand ( online_subcommand) ,
768767 } => {
769- let network = cli_opts. network ;
770768 let home_dir = prepare_home_dir ( cli_opts. datadir ) ?;
771769 let wallet_name = & wallet_opts. wallet ;
772770 let database_path = prepare_wallet_db_dir ( wallet_name, & home_dir) ?;
@@ -967,7 +965,7 @@ async fn respond(
967965 } ;
968966 if let Some ( value) = response {
969967 let value = serde_json:: to_string_pretty ( & value) . map_err ( |e| e. to_string ( ) ) ?;
970- writeln ! ( std:: io:: stdout( ) , "{}" , value ) . map_err ( |e| e. to_string ( ) ) ?;
968+ writeln ! ( std:: io:: stdout( ) , "{value}" ) . map_err ( |e| e. to_string ( ) ) ?;
971969 std:: io:: stdout ( ) . flush ( ) . map_err ( |e| e. to_string ( ) ) ?;
972970 Ok ( false )
973971 } else {
0 commit comments