aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/text.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-02 14:24:23 +0200
committerMs2ger <ms2ger@gmail.com>2015-04-02 14:45:49 +0200
commit6d7dead4ef35cc166bcbaec3c8817f8d35005a37 (patch)
tree979c06dcfe63dc9cf4c448c205117243fa7c2a51 /components/layout/text.rs
parentcd8c03bb4924228d960da4c5a232db2e2d3e2d29 (diff)
downloadservo-6d7dead4ef35cc166bcbaec3c8817f8d35005a37.tar.gz
servo-6d7dead4ef35cc166bcbaec3c8817f8d35005a37.zip
Use isize for CharIndex.
Diffstat (limited to 'components/layout/text.rs')
-rw-r--r--components/layout/text.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/text.rs b/components/layout/text.rs
index 66a7597c891..6380a4fe6ce 100644
--- a/components/layout/text.rs
+++ b/components/layout/text.rs
@@ -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;
}