Skip to content

Commit 95c4d13

Browse files
committed
slh-dsa: clippy 1.85 fixups
1 parent b5cc9ad commit 95c4d13

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

slh-dsa/src/fors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub(crate) trait ForsParams: HypertreeParams {
199199
for j in 0..Self::A::U32 {
200200
adrs.tree_height.set(j + 1);
201201
adrs.tree_index.set(adrs.tree_index.get() >> 1);
202-
if indices[i as usize] >> j & 1 == 0 {
202+
if (indices[i as usize] >> j) & 1 == 0 {
203203
node = Self::h(pk_seed, &adrs, &node, &sig.0[i as usize].auth[j as usize]);
204204
} else {
205205
node = Self::h(pk_seed, &adrs, &sig.0[i as usize].auth[j as usize], &node);

slh-dsa/src/signature_encoding.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use pkcs8::{
2424
/// small devices. The stack representation consumes `P::SigLen` bytes
2525
///
2626
/// There are no invariants maintained by this struct - every field is a hash value
27-
2827
pub struct Signature<P: ParameterSet> {
2928
pub(crate) randomizer: Array<u8, P::N>,
3029
pub(crate) fors_sig: ForsSignature<P>,

slh-dsa/tests/known_answer_tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ where
136136
let sk = SigningKey::<P>::new(&mut seed_rng.unwrap_mut());
137137
let pk = sk.verifying_key();
138138

139-
writeln!(resp, "pk = {}", hex::encode_upper(&pk.to_bytes())).unwrap();
140-
writeln!(resp, "sk = {}", hex::encode_upper(&sk.to_bytes())).unwrap();
139+
writeln!(resp, "pk = {}", hex::encode_upper(pk.to_bytes())).unwrap();
140+
writeln!(resp, "sk = {}", hex::encode_upper(sk.to_bytes())).unwrap();
141141

142142
let mut opt_rand = vec![0; P::VkLen::USIZE / 2];
143143
rng.fill_bytes(opt_rand.as_mut());

0 commit comments

Comments
 (0)