@@ -63,9 +63,9 @@ pub struct Party {
63
63
impl Party {
64
64
/// Party factory
65
65
pub fn new ( party_id : usize , stake : u64 ) -> Self {
66
- println ! ( "Party #{}: party created with {} stakes" , party_id , stake ) ;
66
+ println ! ( "Party #{party_id }: party created with {stake } stakes" ) ;
67
67
Self {
68
- party_id : format ! ( "{}" , party_id ) as ProtocolPartyId ,
68
+ party_id : format ! ( "{party_id}" ) as ProtocolPartyId ,
69
69
stake : stake as ProtocolStake ,
70
70
params : None ,
71
71
initializer : None ,
@@ -225,7 +225,7 @@ impl Verifier {
225
225
226
226
/// Update protocol parameters
227
227
pub fn update_params ( & mut self , params : & ProtocolParameters ) {
228
- println ! ( "Verifier: protocol params updated to {:?}" , params ) ;
228
+ println ! ( "Verifier: protocol params updated to {params :?}" ) ;
229
229
self . params = Some ( * params) ;
230
230
}
231
231
@@ -242,7 +242,7 @@ impl Verifier {
242
242
. iter ( )
243
243
. map ( |( party_id, stake, _verification_key) | ( party_id. to_owned ( ) , * stake) )
244
244
. collect :: < Vec < _ > > ( ) ;
245
- println ! ( "Verifier: protocol keys registration from {:?}" , players ) ;
245
+ println ! ( "Verifier: protocol keys registration from {players :?}" ) ;
246
246
247
247
let mut key_reg = ProtocolKeyRegistrationNotCertified :: init ( ) ;
248
248
for ( _party_id, stake, verification_key) in players_with_keys {
@@ -404,7 +404,7 @@ impl ProtocolDemonstrator for Demonstrator {
404
404
let mut multi_signature_artifacts = Vec :: new ( ) ;
405
405
for ( i, message) in self . messages . iter ( ) . enumerate ( ) {
406
406
// Issue certificates
407
- println ! ( "Message #{} to sign: {:?}" , i , message ) ;
407
+ println ! ( "Message #{i } to sign: {message :?}" ) ;
408
408
let mut signatures = Vec :: < ProtocolSingleSignature > :: new ( ) ;
409
409
for party in self . parties . iter_mut ( ) {
410
410
if let Some ( party_signature) = party. sign_message ( message) {
@@ -465,7 +465,7 @@ impl ProtocolDemonstrator for Demonstrator {
465
465
466
466
/// Write artifacts helper
467
467
pub fn write_artifacts < T : Serialize > ( artifact_name : & str , value : & T ) {
468
- let artifacts_file_path_name = format ! ( "artifacts/{}.json" , artifact_name ) ;
468
+ let artifacts_file_path_name = format ! ( "artifacts/{artifact_name }.json" ) ;
469
469
let artifacts_file_path = env:: current_dir ( )
470
470
. unwrap ( )
471
471
. join ( path:: Path :: new ( & artifacts_file_path_name) ) ;
@@ -477,7 +477,7 @@ pub fn write_artifacts<T: Serialize>(artifact_name: &str, value: &T) {
477
477
serde_json:: to_string_pretty( value) . unwrap( )
478
478
)
479
479
. unwrap ( ) ;
480
- println ! ( "Artifacts written to {}" , artifacts_file_path_name ) ;
480
+ println ! ( "Artifacts written to {artifacts_file_path_name}" ) ;
481
481
}
482
482
483
483
#[ cfg( test) ]
0 commit comments