Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ConstanceBeguier committed Oct 28, 2024
1 parent 1195c9a commit eafce5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Check warning on line 25 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

field `0` is never read

warning: field `0` is never read --> halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs:25:17 | 25 | PublicPoint(pallas::Affine), | ----------- ^^^^^^^^^^^^^^ | | | field in this variant | = note: `EccPointQ` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 25 | PublicPoint(()), | ~~

Check warning on line 25 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs

View workflow job for this annotation

GitHub Actions / Bitrot check

field `0` is never read
PrivatePoint(&'a NonIdentityEccPoint),

Check warning on line 26 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

field `0` is never read

warning: field `0` is never read --> halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs:26:18 | 26 | PrivatePoint(&'a NonIdentityEccPoint), | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `EccPointQ` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 26 | PrivatePoint(()), | ~~

Check warning on line 26 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs

View workflow job for this annotation

GitHub Actions / Bitrot check

field `0` is never read
Expand Down
2 changes: 1 addition & 1 deletion halo2_gadgets/src/sinsemilla/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> = (0..36).map(|_| os_rng.gen::<bool>()).collect();

let rcm = pallas::Scalar::random(&mut os_rng);
Expand Down

0 comments on commit eafce5f

Please sign in to comment.