fix: correctly use || instead of && in BitOr
This commit is contained in:
parent
a6dc175c8a
commit
01b4e55fec
1 changed files with 3 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ impl core::ops::BitOr<Self> for &Signal<bool> {
|
|||
type Output = Signal<bool>;
|
||||
|
||||
fn bitor(self, other: Self) -> Self::Output {
|
||||
apply2(self, other, |lhs, rhs| lhs && rhs)
|
||||
apply2(self, other, |lhs, rhs| lhs || rhs)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ impl core::ops::BitOr<&ConstantSignal<bool>> for &Signal<bool> {
|
|||
type Output = Signal<bool>;
|
||||
|
||||
fn bitor(self, other: &ConstantSignal<bool>) -> Self::Output {
|
||||
apply2_const(self, other, |lhs, rhs| lhs && rhs)
|
||||
apply2_const(self, other, |lhs, rhs| lhs || rhs)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ impl core::ops::BitOr<Self> for &ConstantSignal<bool> {
|
|||
type Output = ConstantSignal<bool>;
|
||||
|
||||
fn bitor(self, rhs: Self) -> Self::Output {
|
||||
ConstantSignal::<bool>::new(self.value && rhs.value)
|
||||
ConstantSignal::<bool>::new(self.value || rhs.value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue