use core::ops::Not;
use crate::bitman::IsBitLow;
pub trait IsBitHigh {
type Type;
fn is_bit_high(&self, index: Self::Type) -> bool;
}
macro_rules! ImplementIsBitHigh {
($type:ty) => {
impl IsBitHigh for $type {
type Type = Self;
#[inline]
#[must_use]
fn is_bit_high(&self, index: Self) -> bool {
self.is_bit_low(index).not()
}
}
};
}
ImplementIsBitHigh!(u8);
ImplementIsBitHigh!(u32);
ImplementIsBitHigh!(u64);