@@ -113,7 +113,7 @@ pub mod _internal {
113113 type Type : BitFlagNum ;
114114
115115 /// Return a value with all flag bits set.
116- fn all ( ) -> Self :: Type ;
116+ fn all_bits ( ) -> Self :: Type ;
117117
118118 /// Return the bits as a number type.
119119 fn bits ( self ) -> Self :: Type ;
@@ -213,12 +213,12 @@ where
213213
214214 /// Create a BitFlags with all flags set.
215215 pub fn all ( ) -> Self {
216- unsafe { BitFlags :: new ( T :: all ( ) ) }
216+ unsafe { BitFlags :: new ( T :: all_bits ( ) ) }
217217 }
218218
219219 /// Returns true if all flags are set
220220 pub fn is_all ( self ) -> bool {
221- self . val == T :: all ( )
221+ self . val == T :: all_bits ( )
222222 }
223223
224224 /// Returns true if no flag is set
@@ -263,7 +263,7 @@ where
263263
264264 /// Truncates flags that are illegal
265265 pub fn from_bits_truncate ( bits : T :: Type ) -> Self {
266- unsafe { BitFlags :: new ( bits & T :: all ( ) ) }
266+ unsafe { BitFlags :: new ( bits & T :: all_bits ( ) ) }
267267 }
268268
269269 /// Toggles the matching bits
@@ -326,7 +326,7 @@ where
326326{
327327 type Output = BitFlags < T > ;
328328 fn bitxor ( self , other : B ) -> BitFlags < T > {
329- unsafe { BitFlags :: new ( ( self . bits ( ) ^ other. into ( ) . bits ( ) ) & T :: all ( ) ) }
329+ unsafe { BitFlags :: new ( self . bits ( ) ^ other. into ( ) . bits ( ) ) }
330330 }
331331}
332332
@@ -365,7 +365,7 @@ where
365365{
366366 type Output = BitFlags < T > ;
367367 fn not ( self ) -> BitFlags < T > {
368- unsafe { BitFlags :: new ( !self . bits ( ) & T :: all ( ) ) }
368+ unsafe { BitFlags :: new ( !self . bits ( ) & T :: all_bits ( ) ) }
369369 }
370370}
371371
0 commit comments