Skip to content

Commit c79c9df

Browse files
committed
pass
1 parent dd80f42 commit c79c9df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sys/flags.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,16 +709,16 @@ impl NodeFlags {
709709
self.0
710710
}
711711

712-
pub fn contains(&self, bit: tsk_flags_t) -> bool {
713-
bit == 0 || (self.0 & bit) != 0
712+
pub fn contains<I>(&self, bit: I) -> bool where I: Into<Self> + Copy{
713+
bit.into().0 == 0 || (self.0 & bit.into().0) != 0
714714
}
715715

716716
pub fn toggle(&mut self, bit: tsk_flags_t) {
717717
self.0 ^= bit
718718
}
719719

720-
pub fn remove(&mut self, bit: tsk_flags_t) {
721-
self.0 &= !bit
720+
pub fn remove<I>(&mut self, bit: I) where I: Into<Self> {
721+
self.0 &= !bit.into().0
722722
}
723723
}
724724

0 commit comments

Comments
 (0)