@@ -790,13 +790,13 @@ fn copy_keys(
790
790
let to_keys: HashSet < _ > = keystore. raw_public_keys ( to_key_type) ?. into_iter ( ) . collect ( ) ;
791
791
let to_copy: Vec < _ > = from_keys. difference ( & to_keys) . collect ( ) ;
792
792
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 :?}" ) ;
795
795
log:: debug!( target: LOG_TARGET , "to_copy: {:?} from {:?} to {:?}" , & to_copy, from_key_type, to_key_type) ;
796
796
797
797
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 ( ) {
800
800
log:: error!(
801
801
target: LOG_TARGET ,
802
802
"Failed to copy key {:?} into keystore, insert operation failed." ,
@@ -806,9 +806,7 @@ fn copy_keys(
806
806
} else {
807
807
log:: error!(
808
808
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"
812
810
) ;
813
811
}
814
812
}
0 commit comments