diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-10-11 20:13:40 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-10-11 20:13:40 +0200 |
commit | a38df68e8aa7e237b52a46e6437b14a029ea001a (patch) | |
tree | b828353390b0d1de7e6354150cfaeae40800cb0a /components/gfx/text | |
parent | 105c5d2a0692c6e09320c5d967b43f879c3cd00d (diff) | |
download | servo-a38df68e8aa7e237b52a46e6437b14a029ea001a.tar.gz servo-a38df68e8aa7e237b52a46e6437b14a029ea001a.zip |
Remove usage of unstable range_contains feature
Diffstat (limited to 'components/gfx/text')
-rw-r--r-- | components/gfx/text/shaping/harfbuzz.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 1069e3460ba..a5347229364 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -306,8 +306,8 @@ impl Shaper { // have found a contiguous "cluster" and can stop extending it. let mut all_glyphs_are_within_cluster: bool = true; for j in glyph_span.clone() { - let loc = glyph_data.byte_offset_of_glyph(j); - if !byte_range.contains(loc as usize) { + let loc = glyph_data.byte_offset_of_glyph(j) as usize; + if !(byte_range.start <= loc && loc < byte_range.end) { all_glyphs_are_within_cluster = false; break } |