@@ -125,9 +125,9 @@ impl char {
125
125
panic ! ( "to_digit: radix is too high (maximum 36)" ) ;
126
126
}
127
127
let val = match self {
128
- '0' ... '9' => self as u32 - '0' as u32 ,
129
- 'a' ... 'z' => self as u32 - 'a' as u32 + 10 ,
130
- 'A' ... 'Z' => self as u32 - 'A' as u32 + 10 ,
128
+ '0' ..= '9' => self as u32 - '0' as u32 ,
129
+ 'a' ..= 'z' => self as u32 - 'a' as u32 + 10 ,
130
+ 'A' ..= 'Z' => self as u32 - 'A' as u32 + 10 ,
131
131
_ => return None ,
132
132
} ;
133
133
if val < radix { Some ( val) }
@@ -305,7 +305,7 @@ impl char {
305
305
'\r' => EscapeDefaultState :: Backslash ( 'r' ) ,
306
306
'\n' => EscapeDefaultState :: Backslash ( 'n' ) ,
307
307
'\\' | '\'' | '"' => EscapeDefaultState :: Backslash ( self ) ,
308
- '\x20' ... '\x7e' => EscapeDefaultState :: Char ( self ) ,
308
+ '\x20' ..= '\x7e' => EscapeDefaultState :: Char ( self ) ,
309
309
_ => EscapeDefaultState :: Unicode ( self . escape_unicode ( ) )
310
310
} ;
311
311
EscapeDefault { state : init_state }
@@ -543,7 +543,7 @@ impl char {
543
543
#[ inline]
544
544
pub fn is_alphabetic ( self ) -> bool {
545
545
match self {
546
- 'a' ... 'z' | 'A' ... 'Z' => true ,
546
+ 'a' ..= 'z' | 'A' ..= 'Z' => true ,
547
547
c if c > '\x7f' => derived_property:: Alphabetic ( c) ,
548
548
_ => false ,
549
549
}
@@ -599,7 +599,7 @@ impl char {
599
599
#[ inline]
600
600
pub fn is_lowercase ( self ) -> bool {
601
601
match self {
602
- 'a' ... 'z' => true ,
602
+ 'a' ..= 'z' => true ,
603
603
c if c > '\x7f' => derived_property:: Lowercase ( c) ,
604
604
_ => false ,
605
605
}
@@ -627,7 +627,7 @@ impl char {
627
627
#[ inline]
628
628
pub fn is_uppercase ( self ) -> bool {
629
629
match self {
630
- 'A' ... 'Z' => true ,
630
+ 'A' ..= 'Z' => true ,
631
631
c if c > '\x7f' => derived_property:: Uppercase ( c) ,
632
632
_ => false ,
633
633
}
@@ -654,7 +654,7 @@ impl char {
654
654
#[ inline]
655
655
pub fn is_whitespace ( self ) -> bool {
656
656
match self {
657
- ' ' | '\x09' ... '\x0d' => true ,
657
+ ' ' | '\x09' ..= '\x0d' => true ,
658
658
c if c > '\x7f' => property:: White_Space ( c) ,
659
659
_ => false ,
660
660
}
@@ -737,7 +737,7 @@ impl char {
737
737
#[ inline]
738
738
pub fn is_numeric ( self ) -> bool {
739
739
match self {
740
- '0' ... '9' => true ,
740
+ '0' ..= '9' => true ,
741
741
c if c > '\x7f' => general_category:: N ( c) ,
742
742
_ => false ,
743
743
}
0 commit comments