From a38df68e8aa7e237b52a46e6437b14a029ea001a Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 11 Oct 2017 20:13:40 +0200 Subject: Remove usage of unstable range_contains feature --- components/gfx/text/shaping/harfbuzz.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/gfx/text') 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 } -- cgit v1.2.3