@@ -229,6 +229,7 @@ impl EscapeDefault {
229
229
Self ( escape:: EscapeIterInner :: from_array ( data) )
230
230
}
231
231
232
+ #[ inline]
232
233
fn from_unicode ( esc : EscapeUnicode ) -> Self {
233
234
Self ( esc. 0 )
234
235
}
@@ -304,6 +305,7 @@ enum EscapeDebugInner {
304
305
}
305
306
306
307
impl EscapeDebug {
308
+ #[ inline]
307
309
fn printable ( chr : char ) -> Self {
308
310
Self ( EscapeDebugInner :: Char ( chr) )
309
311
}
@@ -314,6 +316,7 @@ impl EscapeDebug {
314
316
Self ( EscapeDebugInner :: Bytes ( iter) )
315
317
}
316
318
319
+ #[ inline]
317
320
fn from_unicode ( esc : EscapeUnicode ) -> Self {
318
321
Self ( EscapeDebugInner :: Bytes ( esc. 0 ) )
319
322
}
@@ -339,6 +342,7 @@ impl Iterator for EscapeDebug {
339
342
}
340
343
}
341
344
345
+ #[ inline]
342
346
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
343
347
let n = self . len ( ) ;
344
348
( n, Some ( n) )
@@ -352,6 +356,7 @@ impl Iterator for EscapeDebug {
352
356
353
357
#[ stable( feature = "char_escape_debug" , since = "1.20.0" ) ]
354
358
impl ExactSizeIterator for EscapeDebug {
359
+ #[ inline]
355
360
fn len ( & self ) -> usize {
356
361
match & self . 0 {
357
362
EscapeDebugInner :: Bytes ( bytes) => bytes. len ( ) ,
@@ -389,6 +394,7 @@ impl Iterator for ToLowercase {
389
394
fn next ( & mut self ) -> Option < char > {
390
395
self . 0 . next ( )
391
396
}
397
+ #[ inline]
392
398
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
393
399
self . 0 . size_hint ( )
394
400
}
@@ -423,6 +429,7 @@ impl Iterator for ToUppercase {
423
429
fn next ( & mut self ) -> Option < char > {
424
430
self . 0 . next ( )
425
431
}
432
+ #[ inline]
426
433
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
427
434
self . 0 . size_hint ( )
428
435
}
@@ -450,6 +457,7 @@ enum CaseMappingIter {
450
457
}
451
458
452
459
impl CaseMappingIter {
460
+ #[ inline]
453
461
fn new ( chars : [ char ; 3 ] ) -> CaseMappingIter {
454
462
if chars[ 2 ] == '\0' {
455
463
if chars[ 1 ] == '\0' {
@@ -465,6 +473,7 @@ impl CaseMappingIter {
465
473
466
474
impl Iterator for CaseMappingIter {
467
475
type Item = char ;
476
+ #[ inline]
468
477
fn next ( & mut self ) -> Option < char > {
469
478
match * self {
470
479
CaseMappingIter :: Three ( a, b, c) => {
@@ -483,6 +492,7 @@ impl Iterator for CaseMappingIter {
483
492
}
484
493
}
485
494
495
+ #[ inline]
486
496
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
487
497
let size = match self {
488
498
CaseMappingIter :: Three ( ..) => 3 ,
@@ -495,6 +505,7 @@ impl Iterator for CaseMappingIter {
495
505
}
496
506
497
507
impl DoubleEndedIterator for CaseMappingIter {
508
+ #[ inline]
498
509
fn next_back ( & mut self ) -> Option < char > {
499
510
match * self {
500
511
CaseMappingIter :: Three ( a, b, c) => {
0 commit comments