diff --git a/zebra-chain/src/sapling/keys.rs b/zebra-chain/src/sapling/keys.rs index 7b6e783b8c..0e395c59ed 100644 --- a/zebra-chain/src/sapling/keys.rs +++ b/zebra-chain/src/sapling/keys.rs @@ -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 { diff --git a/zebra-chain/src/serialization/tests/preallocate.rs b/zebra-chain/src/serialization/tests/preallocate.rs index 405fd13659..f84e906c39 100644 --- a/zebra-chain/src/serialization/tests/preallocate.rs +++ b/zebra-chain/src/serialization/tests/preallocate.rs @@ -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"); diff --git a/zebra-chain/src/work/difficulty/arbitrary.rs b/zebra-chain/src/work/difficulty/arbitrary.rs index 96d1f90535..de6ea9ca6e 100644 --- a/zebra-chain/src/work/difficulty/arbitrary.rs +++ b/zebra-chain/src/work/difficulty/arbitrary.rs @@ -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;