diff --git a/mithril-stm/benches/multi_sig.rs b/mithril-stm/benches/multi_sig.rs index 4fc4f64654b..7200eaf94fe 100644 --- a/mithril-stm/benches/multi_sig.rs +++ b/mithril-stm/benches/multi_sig.rs @@ -12,7 +12,7 @@ fn batch_benches(c: &mut Criterion, array_batches: &[usize], nr_sigs: usize) { let mut batch_sig = Vec::new(); for &nr_batches in array_batches { - let batch_string = format!("Batch size: {}", nr_batches); + let batch_string = format!("Batch size: {nr_batches}"); for _ in 0..nr_batches { let mut msg = [0u8; 32]; diff --git a/mithril-stm/benches/size_benches.rs b/mithril-stm/benches/size_benches.rs index fb589d720cd..1754e12c396 100644 --- a/mithril-stm/benches/size_benches.rs +++ b/mithril-stm/benches/size_benches.rs @@ -15,7 +15,7 @@ where H: Digest + Clone + Sync + Send + Default + FixedOutput, { println!("+-------------------+"); - println!("| Hash: {} |", hash_name); + println!("| Hash: {hash_name} |"); println!("+-------------------+"); let mut rng = ChaCha20Rng::from_seed([0u8; 32]); let mut msg = [0u8; 16]; diff --git a/mithril-stm/benches/stm.rs b/mithril-stm/benches/stm.rs index 5586fba1737..b387934626a 100644 --- a/mithril-stm/benches/stm.rs +++ b/mithril-stm/benches/stm.rs @@ -17,7 +17,7 @@ fn stm_benches(c: &mut Criterion, nr_parties: usize, params: StmParameters, h where H: Clone + Debug + Digest + Send + Sync + FixedOutput + Default, { - let mut group = c.benchmark_group(format!("STM/{}", hashing_alg)); + let mut group = c.benchmark_group(format!("STM/{hashing_alg}")); let mut rng = ChaCha20Rng::from_seed([0u8; 32]); let mut msg = [0u8; 16]; rng.fill_bytes(&mut msg); @@ -82,7 +82,7 @@ fn batch_benches( ) where H: Clone + Debug + Digest + FixedOutput + Send + Sync, { - let mut group = c.benchmark_group(format!("STM/{}", hashing_alg)); + let mut group = c.benchmark_group(format!("STM/{hashing_alg}")); let mut rng = ChaCha20Rng::from_seed([0u8; 32]); let param_string = format!( @@ -91,7 +91,7 @@ fn batch_benches( ); for &nr_batches in array_batches { - let batch_string = format!("{}/batch size: {}", param_string, nr_batches); + let batch_string = format!("{param_string}/batch size: {nr_batches}"); let mut batch_msgs = Vec::with_capacity(nr_batches); let mut batch_params = Vec::with_capacity(nr_batches); diff --git a/mithril-stm/examples/key_registration.rs b/mithril-stm/examples/key_registration.rs index 904c0ef6d67..fceaa56d7b4 100644 --- a/mithril-stm/examples/key_registration.rs +++ b/mithril-stm/examples/key_registration.rs @@ -115,7 +115,7 @@ fn main() { let msig_1 = match clerk.aggregate(&complete_sigs_1, &msg) { Ok(s) => s, Err(e) => { - panic!("Aggregation failed: {:?}", e) + panic!("Aggregation failed: {e:?}") } }; assert!(msig_1.verify(&msg, &clerk.compute_avk(), ¶ms).is_ok()); @@ -123,7 +123,7 @@ fn main() { let msig_2 = match clerk.aggregate(&complete_sigs_2, &msg) { Ok(s) => s, Err(e) => { - panic!("Aggregation failed: {:?}", e) + panic!("Aggregation failed: {e:?}") } }; assert!(msig_2.verify(&msg, &clerk.compute_avk(), ¶ms).is_ok()); diff --git a/mithril-stm/src/stm.rs b/mithril-stm/src/stm.rs index c141a3ac781..bcf218e71e4 100644 --- a/mithril-stm/src/stm.rs +++ b/mithril-stm/src/stm.rs @@ -1015,10 +1015,10 @@ mod tests { } let dedup_result = clerk.dedup_sigs_for_indices(&msg, &sigs); - assert!(dedup_result.is_ok(), "dedup failure {:?}", dedup_result); + assert!(dedup_result.is_ok(), "dedup failure {dedup_result:?}"); for passed_sigs in dedup_result.unwrap() { let verify_result = passed_sigs.verify(¶ms, &ps[0].vk, &ps[0].stake, &avk, &msg); - assert!(verify_result.is_ok(), "verify {:?}", verify_result); + assert!(verify_result.is_ok(), "verify {verify_result:?}"); } } } @@ -1044,7 +1044,7 @@ mod tests { match msig { Ok(aggr) => { let verify_result = aggr.verify(&msg, &clerk.compute_avk(), ¶ms); - assert!(verify_result.is_ok(), "Verification failed: {:?}", verify_result); + assert!(verify_result.is_ok(), "Verification failed: {verify_result:?}"); } Err(AggregationError::NotEnoughSignatures(n, k)) => assert!(n < params.k || k == params.k),