Use std::cmp::Ordering explicitly.

This commit is contained in:
Ms2ger 2015-01-22 13:25:07 +01:00
parent 59bca2962c
commit 524966e3af
7 changed files with 44 additions and 38 deletions

View file

@ -8,6 +8,7 @@ use platform::font_template::FontTemplateData;
use servo_util::geometry::Au;
use servo_util::range::Range;
use servo_util::vec::{Comparator, FullBinarySearchMethods};
use std::cmp::Ordering;
use std::slice::Items;
use std::sync::Arc;
use text::glyph::{CharIndex, GlyphStore};
@ -42,11 +43,11 @@ struct CharIndexComparator;
impl Comparator<CharIndex,GlyphRun> for CharIndexComparator {
fn compare(&self, key: &CharIndex, value: &GlyphRun) -> Ordering {
if *key < value.range.begin() {
Less
Ordering::Less
} else if *key >= value.range.end() {
Greater
Ordering::Greater
} else {
Equal
Ordering::Equal
}
}
}