diff options
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r-- | components/layout/inline.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs index bc5e432a82e..abf23e488dd 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -35,6 +35,7 @@ use unicode_bidi; use util::geometry::{Au, MAX_AU, ZERO_RECT}; use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; use util::range::{Range, RangeIndex}; +use util::str::slice_chars; use util; // From gfxFontConstants.h in Firefox @@ -1801,7 +1802,7 @@ fn strip_trailing_whitespace_if_necessary(text_run: &TextRun, range: &mut Range< debug!("stripping trailing whitespace: range={:?}, len={}", range, text_run.text.chars().count()); - let text = text_run.text.slice_chars(range.begin().to_usize(), range.end().to_usize()); + let text = slice_chars(&*text_run.text, range.begin().to_usize(), range.end().to_usize()); let mut trailing_whitespace_character_count = 0; for ch in text.chars().rev() { if util::str::char_is_whitespace(ch) { |