Remove impl FiniteBitSetTy for {u64,u128}.

Only the impl for `u32` is used. These can be reinstated easily if
needed in the future.
This commit is contained in:
Nicholas Nethercote 2023-11-13 16:42:08 +11:00
parent b7cf697a6d
commit 8b18c16ecb

View File

@ -1991,54 +1991,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
} }
} }
impl FiniteBitSetTy for u64 {
const DOMAIN_SIZE: u32 = 64;
const FILLED: Self = Self::MAX;
const EMPTY: Self = Self::MIN;
const ONE: Self = 1u64;
const ZERO: Self = 0u64;
fn checked_shl(self, rhs: u32) -> Option<Self> {
self.checked_shl(rhs)
}
fn checked_shr(self, rhs: u32) -> Option<Self> {
self.checked_shr(rhs)
}
}
impl std::fmt::Debug for FiniteBitSet<u64> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{:064b}", self.0)
}
}
impl FiniteBitSetTy for u128 {
const DOMAIN_SIZE: u32 = 128;
const FILLED: Self = Self::MAX;
const EMPTY: Self = Self::MIN;
const ONE: Self = 1u128;
const ZERO: Self = 0u128;
fn checked_shl(self, rhs: u32) -> Option<Self> {
self.checked_shl(rhs)
}
fn checked_shr(self, rhs: u32) -> Option<Self> {
self.checked_shr(rhs)
}
}
impl std::fmt::Debug for FiniteBitSet<u128> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{:0128b}", self.0)
}
}
/// A fixed-sized bitset type represented by an integer type. Indices outwith than the range /// A fixed-sized bitset type represented by an integer type. Indices outwith than the range
/// representable by `T` are considered set. /// representable by `T` are considered set.
#[derive(Copy, Clone, Eq, PartialEq, Decodable, Encodable)] #[derive(Copy, Clone, Eq, PartialEq, Decodable, Encodable)]