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 | |
parent | 105c5d2a0692c6e09320c5d967b43f879c3cd00d (diff) | |
download | servo-a38df68e8aa7e237b52a46e6437b14a029ea001a.tar.gz servo-a38df68e8aa7e237b52a46e6437b14a029ea001a.zip |
Remove usage of unstable range_contains feature
Diffstat (limited to 'components')
-rw-r--r-- | components/gfx/lib.rs | 1 | ||||
-rw-r--r-- | 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 } |