Skip to content

Commit fb8ece5

Browse files
committed
seems decent
1 parent 04da9c5 commit fb8ece5

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
@@ -712,6 +712,14 @@ impl NodeFlags {
712712
pub fn contains(&self, bit: tsk_flags_t) -> bool {
713713
(self.0 & bit) != 0
714714
}
715+
716+
pub fn toggle(self, bit: tsk_flags_t) -> Self {
717+
Self(self.0 ^ bit)
718+
}
719+
720+
pub fn remove(self, bit: tsk_flags_t) -> Self {
721+
Self(self.0 & !bit)
722+
}
715723
}
716724

717725
impl From<tsk_flags_t> for NodeFlags {

0 commit comments

Comments
 (0)