Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

chore: Update nightly lints for 2024-04-08 #887

Merged
merged 1 commit into from
Apr 9, 2024
Merged
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
14 changes: 6 additions & 8 deletions rust/noosphere-collections/src/hamt/bitfield.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// Copyright 2019-2022 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use std::u64;

use byteorder::{BigEndian, ByteOrder};
use serde::de::{Deserialize, Deserializer};
use serde::ser::{Serialize, Serializer};
Expand Down Expand Up @@ -111,16 +109,16 @@ impl Bitfield {
if bit < 64 {
self.0[0] = set_bits_leq(self.0[0], bit);
} else if bit < 128 {
self.0[0] = std::u64::MAX;
self.0[0] = u64::MAX;
self.0[1] = set_bits_leq(self.0[1], bit - 64);
} else if bit < 192 {
self.0[0] = std::u64::MAX;
self.0[1] = std::u64::MAX;
self.0[0] = u64::MAX;
self.0[1] = u64::MAX;
self.0[2] = set_bits_leq(self.0[2], bit - 128);
} else {
self.0[0] = std::u64::MAX;
self.0[1] = std::u64::MAX;
self.0[2] = std::u64::MAX;
self.0[0] = u64::MAX;
self.0[1] = u64::MAX;
self.0[2] = u64::MAX;
self.0[3] = set_bits_leq(self.0[3], bit - 192);
}

Expand Down
Loading