@@ -790,13 +790,13 @@ fn copy_keys(
790790 let to_keys: HashSet < _ > = keystore. raw_public_keys ( to_key_type) ?. into_iter ( ) . collect ( ) ;
791791 let to_copy: Vec < _ > = from_keys. difference ( & to_keys) . collect ( ) ;
792792
793- log:: debug!( target: LOG_TARGET , "from_keys: {:?}" , from_keys ) ;
794- log:: debug!( target: LOG_TARGET , "to_keys: {:?}" , to_keys ) ;
793+ log:: debug!( target: LOG_TARGET , "from_keys: {from_keys :?}" ) ;
794+ log:: debug!( target: LOG_TARGET , "to_keys: {to_keys :?}" ) ;
795795 log:: debug!( target: LOG_TARGET , "to_copy: {:?} from {:?} to {:?}" , & to_copy, from_key_type, to_key_type) ;
796796
797797 for public in to_copy {
798- if let Some ( phrase) = keystore. key_phrase_by_type ( & public, from_key_type) ? {
799- if let Err ( _ ) = keystore. insert ( to_key_type, & phrase, & public) {
798+ if let Some ( phrase) = keystore. key_phrase_by_type ( public, from_key_type) ? {
799+ if keystore. insert ( to_key_type, & phrase, public) . is_err ( ) {
800800 log:: error!(
801801 target: LOG_TARGET ,
802802 "Failed to copy key {:?} into keystore, insert operation failed." ,
@@ -806,9 +806,7 @@ fn copy_keys(
806806 } else {
807807 log:: error!(
808808 target: LOG_TARGET ,
809- "Failed to copy key from {:?} to {:?} as the key phrase is not available" ,
810- from_key_type,
811- to_key_type
809+ "Failed to copy key from {from_key_type:?} to {to_key_type:?} as the key phrase is not available"
812810 ) ;
813811 }
814812 }
0 commit comments