Skip to content

Commit c271eb8

Browse files
committed
more imples
1 parent b257c2b commit c271eb8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/sys/flags.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ use crate::RawFlags;
44
use super::bindings::tsk_flags_t;
55

66
use std::ops::BitAnd;
7+
use std::ops::BitAndAssign;
78
use std::ops::BitOr;
9+
use std::ops::BitOrAssign;
810
use std::ops::BitXor;
911
use std::ops::BitXorAssign;
1012

@@ -69,6 +71,18 @@ macro_rules! impl_bit_ops {
6971
}
7072
}
7173

74+
impl BitAndAssign for $type {
75+
fn bitand_assign(&mut self, rhs: Self) {
76+
self.0 &= rhs.0
77+
}
78+
}
79+
80+
impl BitOrAssign for $type {
81+
fn bitor_assign(&mut self, rhs: Self) {
82+
self.0 |= rhs.0
83+
}
84+
}
85+
7286
impl BitXor for $type {
7387
type Output = Self;
7488
fn bitxor(self, rhs: Self) -> Self::Output {

0 commit comments

Comments
 (0)