@@ -228,6 +228,7 @@ enum PairResult {
228
228
Emoji , // a break if preceded by emoji base and (Extend)*
229
229
}
230
230
231
+ #[ inline]
231
232
fn check_pair ( before : GraphemeCat , after : GraphemeCat ) -> PairResult {
232
233
use crate :: tables:: grapheme:: GraphemeCat :: * ;
233
234
use self :: PairResult :: * ;
@@ -407,6 +408,7 @@ impl GraphemeCursor {
407
408
}
408
409
}
409
410
411
+ #[ inline]
410
412
fn decide ( & mut self , is_break : bool ) {
411
413
self . state = if is_break {
412
414
GraphemeState :: Break
@@ -415,11 +417,13 @@ impl GraphemeCursor {
415
417
} ;
416
418
}
417
419
420
+ #[ inline]
418
421
fn decision ( & mut self , is_break : bool ) -> Result < bool , GraphemeIncomplete > {
419
422
self . decide ( is_break) ;
420
423
Ok ( is_break)
421
424
}
422
425
426
+ #[ inline]
423
427
fn is_boundary_result ( & self ) -> Result < bool , GraphemeIncomplete > {
424
428
if self . state == GraphemeState :: Break {
425
429
Ok ( true )
@@ -432,6 +436,7 @@ impl GraphemeCursor {
432
436
}
433
437
}
434
438
439
+ #[ inline]
435
440
fn handle_regional ( & mut self , chunk : & str , chunk_start : usize ) {
436
441
use crate :: tables:: grapheme as gr;
437
442
let mut ris_count = self . ris_count . unwrap_or ( 0 ) ;
@@ -452,6 +457,7 @@ impl GraphemeCursor {
452
457
self . state = GraphemeState :: Regional ;
453
458
}
454
459
460
+ #[ inline]
455
461
fn handle_emoji ( & mut self , chunk : & str , chunk_start : usize ) {
456
462
use crate :: tables:: grapheme as gr;
457
463
let mut iter = chunk. chars ( ) . rev ( ) ;
@@ -482,6 +488,7 @@ impl GraphemeCursor {
482
488
self . state = GraphemeState :: Emoji ;
483
489
}
484
490
491
+ #[ inline]
485
492
/// Determine whether the current cursor location is a grapheme cluster boundary.
486
493
/// Only a part of the string need be supplied. If `chunk_start` is nonzero or
487
494
/// the length of `chunk` is not equal to `len` on creation, then this method
@@ -563,6 +570,7 @@ impl GraphemeCursor {
563
570
}
564
571
}
565
572
573
+ #[ inline]
566
574
/// Find the next boundary after the current cursor position. Only a part of
567
575
/// the string need be supplied. If the chunk is incomplete, then this
568
576
/// method might return `GraphemeIncomplete::PreContext` or
0 commit comments