diff --git a/src/stdlib.rs b/src/stdlib.rs index 48111fed..e1c32e9a 100644 --- a/src/stdlib.rs +++ b/src/stdlib.rs @@ -1,4 +1,4 @@ -use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign}; +use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Not}; /// Flags describing the set of lua standard libraries to load. #[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)] @@ -144,3 +144,10 @@ impl BitXorAssign for StdLib { *self = StdLib(self.0 ^ rhs.0) } } + +impl Not for StdLib { + type Output = Self; + fn not(self) -> Self::Output { + StdLib(!self.0) + } +}