use constant (#8611)
This commit is contained in:
parent
736f5f5415
commit
f2bc02726c
|
@ -91,7 +91,7 @@ pub(super) fn find_group_hash(d: [u8; 8], m: &[u8]) -> jubjub::ExtendedPoint {
|
|||
let gh = jubjub_group_hash(d, &tag[..]);
|
||||
|
||||
// We don't want to overflow and start reusing generators
|
||||
assert!(tag[i] != u8::max_value());
|
||||
assert!(tag[i] != u8::MAX);
|
||||
tag[i] += 1;
|
||||
|
||||
if let Some(gh) = gh {
|
||||
|
|
|
@ -77,7 +77,7 @@ fn u8_deser_throws_when_input_too_large() {
|
|||
/// Confirm that every u8 takes exactly 1 byte when serialized.
|
||||
/// This verifies that our calculated `MAX_U8_ALLOCATION` is indeed an upper bound.
|
||||
fn u8_size_is_correct() {
|
||||
for byte in std::u8::MIN..=std::u8::MAX {
|
||||
for byte in u8::MIN..=u8::MAX {
|
||||
let serialized = byte
|
||||
.zcash_serialize_to_vec()
|
||||
.expect("Serialization to vec must succeed");
|
||||
|
|
|
@ -49,7 +49,7 @@ impl Arbitrary for Work {
|
|||
// In the Zcash protocol, a Work is converted from an ExpandedDifficulty.
|
||||
// But some randomised difficulties are impractically large, and will
|
||||
// never appear in any real-world block. So we just use a random Work value.
|
||||
(1..std::u128::MAX).prop_map(Work).boxed()
|
||||
(1..u128::MAX).prop_map(Work).boxed()
|
||||
}
|
||||
|
||||
type Strategy = BoxedStrategy<Self>;
|
||||
|
|
Loading…
Reference in New Issue