Skip to content

Commit c4e1907

Browse files
committed
more trait
1 parent de59ba6 commit c4e1907

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sys/flags.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use crate::RawFlags;
33

44
use super::bindings::tsk_flags_t;
55

6+
use std::ops::BitAnd;
67
use std::ops::BitOr;
78
use std::ops::BitXorAssign;
89

@@ -73,6 +74,13 @@ macro_rules! impl_bit_ops {
7374
Self(self.0 | rhs.0)
7475
}
7576
}
77+
78+
impl BitAnd for $type {
79+
type Output = Self;
80+
fn bitand(self, rhs: Self) -> Self::Output {
81+
Self(self.0 & rhs.0)
82+
}
83+
}
7684
};
7785
}
7886

0 commit comments

Comments
 (0)