Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lint): fix a new lint for the last clippy version #8611

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zebra-chain/src/sapling/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/serialization/tests/preallocate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/work/difficulty/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down
Loading