@@ -386,7 +386,7 @@ impl RemoteFs for SftpFs {
386386 . unwrap ( )
387387 . rename ( src. as_path ( ) , dest. as_path ( ) , Some ( RenameFlags :: OVERWRITE ) )
388388 . map_err ( |e| {
389- error ! ( "Move failed: {}" , e ) ;
389+ error ! ( "Move failed: {e }" , ) ;
390390 RemoteError :: new_ex ( RemoteErrorType :: FileCreateDenied , e)
391391 } )
392392 }
@@ -415,7 +415,7 @@ impl RemoteFs for SftpFs {
415415 . map ( SftpWriteStream :: from)
416416 . map ( WriteStream :: from)
417417 . map_err ( |e| {
418- error ! ( "Append failed: {}" , e ) ;
418+ error ! ( "Append failed: {e }" , ) ;
419419 RemoteError :: new_ex ( RemoteErrorType :: CouldNotOpenFile , e)
420420 } )
421421 } else {
@@ -437,7 +437,7 @@ impl RemoteFs for SftpFs {
437437 . map ( SftpWriteStream :: from)
438438 . map ( WriteStream :: from)
439439 . map_err ( |e| {
440- error ! ( "Create failed: {}" , e ) ;
440+ error ! ( "Create failed: {e }" , ) ;
441441 RemoteError :: new_ex ( RemoteErrorType :: FileCreateDenied , e)
442442 } )
443443 } else {
@@ -460,7 +460,7 @@ impl RemoteFs for SftpFs {
460460 . map ( SftpReadStream :: from)
461461 . map ( ReadStream :: from)
462462 . map_err ( |e| {
463- error ! ( "Open failed: {}" , e ) ;
463+ error ! ( "Open failed: {e }" , ) ;
464464 RemoteError :: new_ex ( RemoteErrorType :: CouldNotOpenFile , e)
465465 } )
466466 }
@@ -481,20 +481,20 @@ impl RemoteFs for SftpFs {
481481 while bytes < transfer_size {
482482 let mut buffer: [ u8 ; 65535 ] = [ 0 ; 65535 ] ;
483483 let bytes_read = reader. read ( & mut buffer) . map_err ( |e| {
484- error ! ( "Failed to read from file: {}" , e ) ;
484+ error ! ( "Failed to read from file: {e }" , ) ;
485485 RemoteError :: new_ex ( RemoteErrorType :: IoError , e)
486486 } ) ?;
487487 let mut delta = 0 ;
488488 while delta < bytes_read {
489489 delta += stream. write ( & buffer[ delta..bytes_read] ) . map_err ( |e| {
490- error ! ( "Failed to write to stream: {}" , e ) ;
490+ error ! ( "Failed to write to stream: {e }" , ) ;
491491 RemoteError :: new_ex ( RemoteErrorType :: IoError , e)
492492 } ) ?;
493493 }
494494 bytes += bytes_read;
495495 }
496496 self . on_written ( stream) ?;
497- trace ! ( "Written {} bytes to destination" , bytes ) ;
497+ trace ! ( "Written {bytes } bytes to destination" , ) ;
498498 Ok ( bytes as u64 )
499499 } else {
500500 Err ( RemoteError :: new ( RemoteErrorType :: NotConnected ) )
@@ -515,20 +515,20 @@ impl RemoteFs for SftpFs {
515515 while bytes < transfer_size {
516516 let mut buffer: [ u8 ; 65535 ] = [ 0 ; 65535 ] ;
517517 let bytes_read = reader. read ( & mut buffer) . map_err ( |e| {
518- error ! ( "Failed to read from file: {}" , e ) ;
518+ error ! ( "Failed to read from file: {e }" , ) ;
519519 RemoteError :: new_ex ( RemoteErrorType :: IoError , e)
520520 } ) ?;
521521 let mut delta = 0 ;
522522 while delta < bytes_read {
523523 delta += stream. write ( & buffer[ delta..bytes_read] ) . map_err ( |e| {
524- error ! ( "Failed to write to stream: {}" , e ) ;
524+ error ! ( "Failed to write to stream: {e }" , ) ;
525525 RemoteError :: new_ex ( RemoteErrorType :: IoError , e)
526526 } ) ?;
527527 }
528528 bytes += bytes_read;
529529 }
530530 self . on_written ( stream) ?;
531- trace ! ( "Written {} bytes to destination" , bytes ) ;
531+ trace ! ( "Written {bytes } bytes to destination" , ) ;
532532 Ok ( bytes as u64 )
533533 } else {
534534 Err ( RemoteError :: new ( RemoteErrorType :: NotConnected ) )
@@ -544,20 +544,20 @@ impl RemoteFs for SftpFs {
544544 while bytes < transfer_size {
545545 let mut buffer: [ u8 ; 65535 ] = [ 0 ; 65535 ] ;
546546 let bytes_read = stream. read ( & mut buffer) . map_err ( |e| {
547- error ! ( "Failed to read from stream: {}" , e ) ;
547+ error ! ( "Failed to read from stream: {e}" ) ;
548548 RemoteError :: new_ex ( RemoteErrorType :: IoError , e)
549549 } ) ?;
550550 let mut delta = 0 ;
551551 while delta < bytes_read {
552552 delta += dest. write ( & buffer[ delta..bytes_read] ) . map_err ( |e| {
553- error ! ( "Failed to write to file: {}" , e ) ;
553+ error ! ( "Failed to write to file: {e }" , ) ;
554554 RemoteError :: new_ex ( RemoteErrorType :: IoError , e)
555555 } ) ?;
556556 }
557557 bytes += bytes_read;
558558 }
559559 self . on_read ( stream) ?;
560- trace ! ( "Copied {} bytes to destination" , bytes ) ;
560+ trace ! ( "Copied {bytes } bytes to destination" , ) ;
561561 Ok ( bytes as u64 )
562562 } else {
563563 Err ( RemoteError :: new ( RemoteErrorType :: NotConnected ) )
0 commit comments