We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c3d0bf commit 021da30Copy full SHA for 021da30
enumflags/src/lib.rs
@@ -188,11 +188,6 @@ where
188
(self.bits() & other.bits()) == other.bits()
189
}
190
191
- /// Flips all flags
192
- pub fn not(self) -> Self {
193
- unsafe { BitFlags::new(!self.bits() & T::all()) }
194
- }
195
-
196
/// Returns a BitFlags iff the bits value does not contain any illegal flags.
197
pub fn from_bits(bits: T::Type) -> Option<Self> {
198
if bits & !Self::all().bits() == Self::empty().bits() {
@@ -306,7 +301,7 @@ where
306
301
{
307
302
type Output = BitFlags<T>;
308
303
fn not(self) -> BitFlags<T> {
309
- self.not()
304
+ unsafe { BitFlags::new(!self.bits() & T::all()) }
310
305
311
312
0 commit comments