From a38df68e8aa7e237b52a46e6437b14a029ea001a Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 11 Oct 2017 20:13:40 +0200 Subject: [PATCH] Remove usage of unstable range_contains feature --- components/gfx/lib.rs | 1 - components/gfx/text/shaping/harfbuzz.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 97bda55b563..f6be899f4b1 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -6,7 +6,6 @@ #![cfg_attr(any(target_os = "linux", target_os = "android"), feature(allocator_api))] #![feature(box_syntax)] #![feature(cfg_target_feature)] -#![feature(range_contains)] #![deny(unsafe_code)] 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 }