Remove usage of unstable range_contains feature

This commit is contained in:
Simon Sapin 2017-10-11 20:13:40 +02:00
parent 105c5d2a06
commit a38df68e8a
2 changed files with 2 additions and 3 deletions

View file

@ -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)]

View file

@ -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
}