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

Commit

Permalink
chore: Update nightly lints for 2024-04-08 (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantell authored Apr 9, 2024
1 parent 48c06a4 commit 85ab610
Showing 1 changed file with 6 additions and 8 deletions.
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

0 comments on commit 85ab610

Please sign in to comment.