use crate::BitVec;
use core::ops::BitAnd;
impl BitAnd for BitVec {
type Output = BitVec;
#[inline]
fn bitand(self, rhs: BitVec) -> Self::Output {
self.bitwise_operation_consume_both(rhs, |(left, right)| left & right)
}
}
impl BitAnd<&BitVec> for BitVec {
type Output = BitVec;
#[inline]
fn bitand(self, rhs: &BitVec) -> Self::Output {
self.bitwise_operation_consume_self(rhs, |(left, right)| left & *right)
}
}
impl BitAnd<BitVec> for &BitVec {
type Output = BitVec;
#[inline]
fn bitand(self, rhs: BitVec) -> Self::Output {
rhs & self
}
}
impl BitAnd for &BitVec {
type Output = BitVec;
#[inline]
fn bitand(self, rhs: &BitVec) -> Self::Output {
self.bitwise_operation(rhs, |(left, right)| *left & *right)
}
}