Skip to content

Commit

Permalink
[para-api] cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jfkthame committed Dec 4, 2023
1 parent 82822d8 commit a6864b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,12 @@ impl<'text> ParagraphBidiInfo<'text> {
}

// Implementation of reorder_line for both BidiInfo and ParagraphBidiInfo.
fn reorder_line<'text>(text: &'text str, line: Range<usize>, levels: Vec<Level>, runs: Vec<LevelRun>) -> Cow<'text, str> {
fn reorder_line<'text>(
text: &'text str,
line: Range<usize>,
levels: Vec<Level>,
runs: Vec<LevelRun>,
) -> Cow<'text, str> {
// If all isolating run sequences are LTR, no reordering is needed
if runs.iter().all(|run| levels[run.start].is_ltr()) {
return text[line].into();
Expand Down
7 changes: 6 additions & 1 deletion src/utf16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,12 @@ impl<'text> ParagraphBidiInfo<'text> {
}

// Implementation of reorder_line for both BidiInfo and ParagraphBidiInfo.
fn reorder_line<'text>(text: &'text [u16], line: Range<usize>, levels: Vec<Level>, runs: Vec<LevelRun>) -> Cow<'text, [u16]> {
fn reorder_line<'text>(
text: &'text [u16],
line: Range<usize>,
levels: Vec<Level>,
runs: Vec<LevelRun>,
) -> Cow<'text, [u16]> {
// If all isolating run sequences are LTR, no reordering is needed
if runs.iter().all(|run| levels[run.start].is_ltr()) {
return text[line].into();
Expand Down

0 comments on commit a6864b1

Please sign in to comment.