From eafce5f6ef7a71d501ed17a0d06edb5b78039191 Mon Sep 17 00:00:00 2001 From: Constance Beguier Date: Mon, 28 Oct 2024 17:31:29 +0100 Subject: [PATCH 1/2] Fix clippy warnings --- halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs | 2 ++ halo2_gadgets/src/sinsemilla/primitives.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs b/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs index cda643417..a10229f7b 100644 --- a/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs +++ b/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs @@ -18,7 +18,9 @@ use pasta_curves::{arithmetic::CurveAffine, pallas}; use std::ops::Deref; /// `EccPointQ` can hold either a public or a private ECC Point +/// (this structure is only used in tests) #[derive(Debug, Clone)] +#[cfg_attr(test, allow(dead_code))] pub enum EccPointQ<'a> { PublicPoint(pallas::Affine), PrivatePoint(&'a NonIdentityEccPoint), diff --git a/halo2_gadgets/src/sinsemilla/primitives.rs b/halo2_gadgets/src/sinsemilla/primitives.rs index 215c09ff9..4721b66a2 100644 --- a/halo2_gadgets/src/sinsemilla/primitives.rs +++ b/halo2_gadgets/src/sinsemilla/primitives.rs @@ -347,7 +347,7 @@ mod tests { let domain = CommitDomain::new("z.cash:ZSA-NoteCommit"); - let mut os_rng = OsRng::default(); + let mut os_rng = OsRng; let msg: Vec = (0..36).map(|_| os_rng.gen::()).collect(); let rcm = pallas::Scalar::random(&mut os_rng); From ac686ba114f7c1d263689650fb31a5fcb3dc9466 Mon Sep 17 00:00:00 2001 From: Constance Beguier Date: Mon, 28 Oct 2024 17:36:42 +0100 Subject: [PATCH 2/2] Fix EccPointQ warnings --- halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs b/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs index a10229f7b..8e09a572e 100644 --- a/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs +++ b/halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs @@ -20,9 +20,10 @@ use std::ops::Deref; /// `EccPointQ` can hold either a public or a private ECC Point /// (this structure is only used in tests) #[derive(Debug, Clone)] -#[cfg_attr(test, allow(dead_code))] pub enum EccPointQ<'a> { + #[allow(dead_code)] PublicPoint(pallas::Affine), + #[allow(dead_code)] PrivatePoint(&'a NonIdentityEccPoint), }