@@ -152,6 +152,7 @@ pub const fn from_digit(num: u32, radix: u32) -> Option<char> {
152
152
pub struct EscapeUnicode ( escape:: EscapeIterInner < 10 > ) ;
153
153
154
154
impl EscapeUnicode {
155
+ #[ inline]
155
156
fn new ( chr : char ) -> Self {
156
157
let mut data = [ ascii:: Char :: Null ; 10 ] ;
157
158
let range = escape:: escape_unicode_into ( & mut data, chr) ;
@@ -219,11 +220,13 @@ impl fmt::Display for EscapeUnicode {
219
220
pub struct EscapeDefault ( escape:: EscapeIterInner < 10 > ) ;
220
221
221
222
impl EscapeDefault {
223
+ #[ inline]
222
224
fn printable ( chr : ascii:: Char ) -> Self {
223
225
let data = [ chr] ;
224
226
Self ( escape:: EscapeIterInner :: from_array ( data) )
225
227
}
226
228
229
+ #[ inline]
227
230
fn backslash ( chr : ascii:: Char ) -> Self {
228
231
let data = [ ascii:: Char :: ReverseSolidus , chr] ;
229
232
Self ( escape:: EscapeIterInner :: from_array ( data) )
@@ -308,6 +311,7 @@ impl EscapeDebug {
308
311
Self ( EscapeDebugInner :: Char ( chr) )
309
312
}
310
313
314
+ #[ inline]
311
315
fn backslash ( chr : ascii:: Char ) -> Self {
312
316
let data = [ ascii:: Char :: ReverseSolidus , chr] ;
313
317
let iter = escape:: EscapeIterInner :: from_array ( data) ;
@@ -318,6 +322,7 @@ impl EscapeDebug {
318
322
Self ( EscapeDebugInner :: Bytes ( esc. 0 ) )
319
323
}
320
324
325
+ #[ inline]
321
326
fn clear ( & mut self ) {
322
327
let bytes = escape:: EscapeIterInner :: from_array ( [ ] ) ;
323
328
self . 0 = EscapeDebugInner :: Bytes ( bytes) ;
@@ -386,6 +391,7 @@ pub struct ToLowercase(CaseMappingIter);
386
391
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
387
392
impl Iterator for ToLowercase {
388
393
type Item = char ;
394
+ #[ inline]
389
395
fn next ( & mut self ) -> Option < char > {
390
396
self . 0 . next ( )
391
397
}
@@ -396,6 +402,7 @@ impl Iterator for ToLowercase {
396
402
397
403
#[ stable( feature = "case_mapping_double_ended" , since = "1.59.0" ) ]
398
404
impl DoubleEndedIterator for ToLowercase {
405
+ #[ inline]
399
406
fn next_back ( & mut self ) -> Option < char > {
400
407
self . 0 . next_back ( )
401
408
}
@@ -420,6 +427,7 @@ pub struct ToUppercase(CaseMappingIter);
420
427
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
421
428
impl Iterator for ToUppercase {
422
429
type Item = char ;
430
+ #[ inline]
423
431
fn next ( & mut self ) -> Option < char > {
424
432
self . 0 . next ( )
425
433
}
@@ -430,6 +438,7 @@ impl Iterator for ToUppercase {
430
438
431
439
#[ stable( feature = "case_mapping_double_ended" , since = "1.59.0" ) ]
432
440
impl DoubleEndedIterator for ToUppercase {
441
+ #[ inline]
433
442
fn next_back ( & mut self ) -> Option < char > {
434
443
self . 0 . next_back ( )
435
444
}
@@ -534,13 +543,15 @@ impl fmt::Display for CaseMappingIter {
534
543
535
544
#[ stable( feature = "char_struct_display" , since = "1.16.0" ) ]
536
545
impl fmt:: Display for ToLowercase {
546
+ #[ inline]
537
547
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
538
548
fmt:: Display :: fmt ( & self . 0 , f)
539
549
}
540
550
}
541
551
542
552
#[ stable( feature = "char_struct_display" , since = "1.16.0" ) ]
543
553
impl fmt:: Display for ToUppercase {
554
+ #[ inline]
544
555
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
545
556
fmt:: Display :: fmt ( & self . 0 , f)
546
557
}
@@ -553,6 +564,7 @@ pub struct TryFromCharError(pub(crate) ());
553
564
554
565
#[ stable( feature = "u8_from_char" , since = "1.59.0" ) ]
555
566
impl fmt:: Display for TryFromCharError {
567
+ #[ inline]
556
568
fn fmt ( & self , fmt : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
557
569
"unicode code point out of range" . fmt ( fmt)
558
570
}
0 commit comments