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