mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Use std::cmp::Ordering explicitly.
This commit is contained in:
parent
59bca2962c
commit
524966e3af
7 changed files with 44 additions and 38 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue