File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use super::bindings::tsk_flags_t;
55
66use std:: ops:: BitAnd ;
77use std:: ops:: BitOr ;
8+ use std:: ops:: BitXor ;
89use std:: ops:: BitXorAssign ;
910
1011macro_rules! make_constant_self {
@@ -68,6 +69,13 @@ macro_rules! impl_bit_ops {
6869 }
6970 }
7071
72+ impl BitXor for $type {
73+ type Output = Self ;
74+ fn bitxor( self , rhs: Self ) -> Self :: Output {
75+ Self ( self . 0 ^ rhs. 0 )
76+ }
77+ }
78+
7179 impl BitOr for $type {
7280 type Output = Self ;
7381 fn bitor( self , rhs: Self ) -> Self :: Output {
Original file line number Diff line number Diff line change @@ -52,5 +52,7 @@ fn test_bit_ops() {
5252 let options = options | SimplificationOptions :: REDUCE_TO_SITE_TOPOLOGY ;
5353 assert ! ( !options. contains( SimplificationOptions :: KEEP_INPUT_ROOTS ) ) ;
5454 assert ! ( options. contains( SimplificationOptions :: REDUCE_TO_SITE_TOPOLOGY ) ) ;
55+ let options = options ^ SimplificationOptions :: REDUCE_TO_SITE_TOPOLOGY ;
56+ assert ! ( !options. contains( SimplificationOptions :: REDUCE_TO_SITE_TOPOLOGY ) ) ;
5557 todo ! ( "need to do more of the op traits" ) ;
5658}
You can’t perform that action at this time.
0 commit comments