@@ -411,7 +411,7 @@ impl AsciiChar {
411411 #[ inline]
412412 #[ must_use]
413413 pub const fn is_alphabetic ( self ) -> bool {
414- ( self . to_not_upper ( ) >= b'a' ) & ( self . to_not_upper ( ) <= b'z' )
414+ ( self . to_not_upper ( ) >= b'a' ) && ( self . to_not_upper ( ) <= b'z' )
415415 }
416416
417417 /// Check if the character is a letter (a-z, A-Z).
@@ -457,14 +457,14 @@ impl AsciiChar {
457457 #[ inline]
458458 #[ must_use]
459459 pub const fn is_ascii_digit ( & self ) -> bool {
460- ( * self as u8 >= b'0' ) & ( * self as u8 <= b'9' )
460+ ( * self as u8 >= b'0' ) && ( * self as u8 <= b'9' )
461461 }
462462
463463 /// Check if the character is a letter or number
464464 #[ inline]
465465 #[ must_use]
466466 pub const fn is_alphanumeric ( self ) -> bool {
467- self . is_alphabetic ( ) | self . is_ascii_digit ( )
467+ self . is_alphabetic ( ) || self . is_ascii_digit ( )
468468 }
469469
470470 /// Check if the character is a letter or number
@@ -491,7 +491,7 @@ impl AsciiChar {
491491 #[ inline]
492492 #[ must_use]
493493 pub const fn is_ascii_blank ( & self ) -> bool {
494- ( * self as u8 == b' ' ) | ( * self as u8 == b'\t' )
494+ ( * self as u8 == b' ' ) || ( * self as u8 == b'\t' )
495495 }
496496
497497 /// Check if the character one of ' ', '\t', '\n', '\r',
@@ -500,7 +500,7 @@ impl AsciiChar {
500500 #[ must_use]
501501 pub const fn is_whitespace ( self ) -> bool {
502502 let b = self as u8 ;
503- self . is_ascii_blank ( ) | ( b == b'\n' ) | ( b == b'\r' ) | ( b == 0x0b ) | ( b == 0x0c )
503+ self . is_ascii_blank ( ) || ( b == b'\n' ) || ( b == b'\r' ) || ( b == 0x0b ) | | ( b == 0x0c )
504504 }
505505
506506 /// Check if the character is a ' ', '\t', '\n', '\r' or '\0xc' (form feed).
@@ -510,9 +510,9 @@ impl AsciiChar {
510510 #[ must_use]
511511 pub const fn is_ascii_whitespace ( & self ) -> bool {
512512 self . is_ascii_blank ( )
513- | ( * self as u8 == b'\n' )
514- | ( * self as u8 == b'\r' )
515- | ( * self as u8 == 0x0c /*form feed*/ )
513+ || ( * self as u8 == b'\n' )
514+ || ( * self as u8 == b'\r' )
515+ || ( * self as u8 == 0x0c /*form feed*/ )
516516 }
517517
518518 /// Check if the character is a control character
@@ -530,7 +530,7 @@ impl AsciiChar {
530530 #[ inline]
531531 #[ must_use]
532532 pub const fn is_ascii_control ( & self ) -> bool {
533- ( ( * self as u8 ) < b' ' ) | ( * self as u8 == 127 )
533+ ( ( * self as u8 ) < b' ' ) || ( * self as u8 == 127 )
534534 }
535535
536536 /// Checks if the character is printable (except space)
@@ -624,7 +624,7 @@ impl AsciiChar {
624624 #[ inline]
625625 #[ must_use]
626626 pub const fn is_ascii_punctuation ( & self ) -> bool {
627- self . is_ascii_graphic ( ) & !self . is_alphanumeric ( )
627+ self . is_ascii_graphic ( ) && !self . is_alphanumeric ( )
628628 }
629629
630630 /// Checks if the character is a valid hex digit
@@ -641,7 +641,7 @@ impl AsciiChar {
641641 #[ inline]
642642 #[ must_use]
643643 pub const fn is_ascii_hexdigit ( & self ) -> bool {
644- self . is_ascii_digit ( ) | ( ( * self as u8 | 0x20_u8 ) . wrapping_sub ( b'a' ) < 6 )
644+ self . is_ascii_digit ( ) || ( ( * self as u8 | 0x20u8 ) . wrapping_sub ( b'a' ) < 6 )
645645 }
646646
647647 /// Unicode has printable versions of the ASCII control codes, like '␛'.
@@ -728,7 +728,7 @@ impl AsciiChar {
728728 #[ must_use]
729729 pub const fn eq_ignore_ascii_case ( & self , other : & Self ) -> bool {
730730 ( self . as_byte ( ) == other. as_byte ( ) )
731- | ( self . is_alphabetic ( ) & ( self . to_not_upper ( ) == other. to_not_upper ( ) ) )
731+ || ( self . is_alphabetic ( ) & & ( self . to_not_upper ( ) == other. to_not_upper ( ) ) )
732732 }
733733}
734734
0 commit comments