File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ impl NodeFlags {
688688 ///
689689 /// This function is called `mark_sample` to not conflict
690690 /// with [`NodeFlags::is_sample`], which predates it.
691- fn mark_sample ( self ) -> Self {
691+ pub fn mark_sample ( self ) -> Self {
692692 Self ( self . 0 | Self :: IS_SAMPLE )
693693 }
694694
@@ -710,15 +710,15 @@ impl NodeFlags {
710710 }
711711
712712 pub fn contains ( & self , bit : tsk_flags_t ) -> bool {
713- ( self . 0 & bit) != 0
713+ bit == 0 || ( self . 0 & bit) != 0
714714 }
715715
716- pub fn toggle ( self , bit : tsk_flags_t ) -> Self {
717- Self ( self . 0 ^ bit)
716+ pub fn toggle ( & mut self , bit : tsk_flags_t ) {
717+ self . 0 ^= bit
718718 }
719719
720- pub fn remove ( self , bit : tsk_flags_t ) -> Self {
721- Self ( self . 0 & !bit)
720+ pub fn remove ( & mut self , bit : tsk_flags_t ) {
721+ self . 0 &= !bit
722722 }
723723}
724724
You can’t perform that action at this time.
0 commit comments