Skip to content

Commit 4aa6214

Browse files
authored
feat: implement Not for StdLib (#699)
1 parent 72824a4 commit 4aa6214

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/stdlib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign};
1+
use std::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Not};
22

33
/// Flags describing the set of lua standard libraries to load.
44
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
@@ -144,3 +144,10 @@ impl BitXorAssign for StdLib {
144144
*self = StdLib(self.0 ^ rhs.0)
145145
}
146146
}
147+
148+
impl Not for StdLib {
149+
type Output = Self;
150+
fn not(self) -> Self::Output {
151+
StdLib(!self.0)
152+
}
153+
}

0 commit comments

Comments
 (0)