mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use isize for CharIndex.
This commit is contained in:
parent
cd8c03bb49
commit
6d7dead4ef
2 changed files with 7 additions and 7 deletions
|
@ -138,7 +138,7 @@ impl TextRunScanner {
|
|||
};
|
||||
|
||||
let mut new_line_pos = Vec::new();
|
||||
let old_length = CharIndex(run_text.chars().count() as int);
|
||||
let old_length = CharIndex(run_text.chars().count() as isize);
|
||||
last_whitespace = util::transform_text(in_fragment.as_slice(),
|
||||
compression,
|
||||
last_whitespace,
|
||||
|
@ -146,7 +146,7 @@ impl TextRunScanner {
|
|||
&mut new_line_pos);
|
||||
new_line_positions.push(NewLinePositions(new_line_pos));
|
||||
|
||||
let added_chars = CharIndex(run_text.chars().count() as int) - old_length;
|
||||
let added_chars = CharIndex(run_text.chars().count() as isize) - old_length;
|
||||
new_ranges.push(Range::new(char_total, added_chars));
|
||||
char_total = char_total + added_chars;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue