Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86509ee

Browse files
committed
Increase inlining
1 parenta08c4e5 commit86509ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/grapheme.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ enum PairResult {
228228
Emoji,// a break if preceded by emoji base and (Extend)*
229229
}
230230

231+
#[inline]
231232
fncheck_pair(before:GraphemeCat,after:GraphemeCat) ->PairResult{
232233
usecrate::tables::grapheme::GraphemeCat::*;
233234
useself::PairResult::*;
@@ -407,6 +408,7 @@ impl GraphemeCursor {
407408
}
408409
}
409410

411+
#[inline]
410412
fndecide(&mutself,is_break:bool){
411413
self.state =if is_break{
412414
GraphemeState::Break
@@ -415,11 +417,13 @@ impl GraphemeCursor {
415417
};
416418
}
417419

420+
#[inline]
418421
fndecision(&mutself,is_break:bool) ->Result<bool,GraphemeIncomplete>{
419422
self.decide(is_break);
420423
Ok(is_break)
421424
}
422425

426+
#[inline]
423427
fnis_boundary_result(&self) ->Result<bool,GraphemeIncomplete>{
424428
ifself.state ==GraphemeState::Break{
425429
Ok(true)
@@ -432,6 +436,7 @@ impl GraphemeCursor {
432436
}
433437
}
434438

439+
#[inline]
435440
fnhandle_regional(&mutself,chunk:&str,chunk_start:usize){
436441
usecrate::tables::graphemeas gr;
437442
letmut ris_count =self.ris_count.unwrap_or(0);
@@ -452,6 +457,7 @@ impl GraphemeCursor {
452457
self.state =GraphemeState::Regional;
453458
}
454459

460+
#[inline]
455461
fnhandle_emoji(&mutself,chunk:&str,chunk_start:usize){
456462
usecrate::tables::graphemeas gr;
457463
letmut iter = chunk.chars().rev();
@@ -482,6 +488,7 @@ impl GraphemeCursor {
482488
self.state =GraphemeState::Emoji;
483489
}
484490

491+
#[inline]
485492
/// Determine whether the current cursor location is a grapheme cluster boundary.
486493
/// Only a part of the string need be supplied. If `chunk_start` is nonzero or
487494
/// the length of `chunk` is not equal to `len` on creation, then this method
@@ -563,6 +570,7 @@ impl GraphemeCursor {
563570
}
564571
}
565572

573+
#[inline]
566574
/// Find the next boundary after the current cursor position. Only a part of
567575
/// the string need be supplied. If the chunk is incomplete, then this
568576
/// method might return `GraphemeIncomplete::PreContext` or

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp