Skip to content

Commit 8b95e94

Browse files
committed
[clippy] use variables directly in format strings
1 parent 4dac27d commit 8b95e94

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

schnorr_fun/src/frost/share.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ mod share_backup {
489489
if share_index_u32 >= HUMAN_READABLE_THRESHOLD {
490490
prop_assert!(backup.starts_with("frost1"));
491491
} else {
492-
assert!(backup.starts_with(&format!("frost[{}]", share_index_u32)));
492+
assert!(backup.starts_with(&format!("frost[{share_index_u32}]")));
493493
}
494494

495495
prop_assert_eq!(SecretShare::from_bech32_backup(&backup), Ok(secret_share))

secp256kfun/tests/test_hash_to_curve.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@ fn test_hash_to_curve_sswu_test_vectors() {
4444
assert_eq!(
4545
&x_bytes[..],
4646
&expected_x[..],
47-
"Test vector {} failed: x coordinate mismatch",
48-
i
47+
"Test vector {i} failed: x coordinate mismatch",
4948
);
5049
assert_eq!(
5150
&y_bytes[..],
5251
&expected_y[..],
53-
"Test vector {} failed: y coordinate mismatch",
54-
i
52+
"Test vector {i} failed: y coordinate mismatch",
5553
);
5654
}
5755
}
@@ -149,8 +147,7 @@ fn test_hash_to_curve_test_vectors() {
149147

150148
assert_eq!(
151149
actual_bytes, expected_bytes,
152-
"Test vector {} failed: msg={:?}",
153-
i, msg
150+
"Test vector {i} failed: msg={msg:?}",
154151
);
155152

156153
// Verify determinism
@@ -209,8 +206,7 @@ fn test_hash_to_curve_rfc9381_tai() {
209206

210207
assert_eq!(
211208
actual_bytes, expected_bytes,
212-
"Test vector {} failed: msg={:?}, salt={:?}",
213-
i, msg, salt
209+
"Test vector {i} failed: msg={msg:?}, salt={salt:?}",
214210
);
215211

216212
// Verify determinism

0 commit comments

Comments
 (0)