pxar: match_pattern: impl invert() to switch the match type of a MatchPattern.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2019-12-16 12:13:46 +01:00 committed by Dietmar Maurer
parent 48af80b3ab
commit a333b4ccea

View File

@ -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)]