diff --git a/src/pxar/match_pattern.rs b/src/pxar/match_pattern.rs index c5af8f28..d4424264 100644 --- a/src/pxar/match_pattern.rs +++ b/src/pxar/match_pattern.rs @@ -202,6 +202,11 @@ impl MatchPattern { MatchPatternSlice::to_bytes(&slices) } + + /// Invert the match type for this MatchPattern. + pub fn invert(&mut self) { + self.match_positive = !self.match_positive; + } } #[derive(Clone)]