Fix a couple more lints.
This commit is contained in:
parent
98530184c0
commit
3423b03c6d
|
@ -1,4 +1,3 @@
|
|||
#![allow(clippy::assertions_on_constants)]
|
||||
//! Implementation of [group hashing into Jubjub][grouphash].
|
||||
//!
|
||||
//! [grouphash]: https://zips.z.cash/protocol/protocol.pdf#concretegrouphashjubjub
|
||||
|
@ -12,6 +11,7 @@ use blake2s_simd::Params;
|
|||
/// Produces a random point in the Jubjub curve.
|
||||
/// The point is guaranteed to be prime order
|
||||
/// and not the identity.
|
||||
#[allow(clippy::assertions_on_constants)]
|
||||
pub fn group_hash(tag: &[u8], personalization: &[u8]) -> Option<jubjub::SubgroupPoint> {
|
||||
assert_eq!(personalization.len(), 8);
|
||||
|
||||
|
|
|
@ -347,9 +347,8 @@ fn test_sprout_constraints() {
|
|||
fn get_u256<R: ReadBytesExt>(mut reader: R) -> [u8; 32] {
|
||||
let mut result = [0u8; 32];
|
||||
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
for i in 0..32 {
|
||||
result[i] = reader.read_u8().unwrap();
|
||||
for b in &mut result {
|
||||
*b = reader.read_u8().unwrap();
|
||||
}
|
||||
|
||||
result
|
||||
|
@ -375,9 +374,8 @@ fn test_sprout_constraints() {
|
|||
auth_path[i] = Some((sibling, false));
|
||||
}
|
||||
let mut position = test_vector.read_u64::<LittleEndian>().unwrap();
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
for i in 0..TREE_DEPTH {
|
||||
if let Some(p) = auth_path[i].as_mut() {
|
||||
for sibling in &mut auth_path {
|
||||
if let Some(p) = sibling {
|
||||
p.1 = (position & 1) == 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue