mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 03:04:13 +03:00
perf: a small optimization to signed_integer equality checks
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
4ccc9c31db
commit
f9e6b3caa8
@ -53,7 +53,8 @@ macro_rules! eq_gadget_impl {
|
||||
|
||||
impl PartialEq for $gadget {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
!self.value.is_none() && !other.value.is_none() && self.value == other.value
|
||||
// self.value == other.value means that other.value.is_some() too
|
||||
self.value.is_some() && self.value == other.value
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user