use super::*;
impl<A: Aleo, Private: Visibility<A>> Equal<Self> for Entry<A, Private> {
type Output = Boolean<A>;
fn is_equal(&self, other: &Self) -> Self::Output {
match (self, other) {
(Self::Constant(a), Self::Constant(b)) => a.is_equal(b),
(Self::Public(a), Self::Public(b)) => a.is_equal(b),
(Self::Private(a), Self::Private(b)) => a.is_equal(b),
(Self::Constant(_), _) | (Self::Public(_), _) | (Self::Private(_), _) => Boolean::constant(false),
}
}
fn is_not_equal(&self, other: &Self) -> Self::Output {
match (self, other) {
(Self::Constant(a), Self::Constant(b)) => a.is_not_equal(b),
(Self::Public(a), Self::Public(b)) => a.is_not_equal(b),
(Self::Private(a), Self::Private(b)) => a.is_not_equal(b),
(Self::Constant(_), _) | (Self::Public(_), _) | (Self::Private(_), _) => Boolean::constant(true),
}
}
}