mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -1161,6 +1161,7 @@ impl<K: Eq + Hash, V> FindPush<K, V> for HashMap<K, Vec<V>> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::cmp::Ordering;
|
||||
use std::sync::Arc;
|
||||
use super::{DeclarationBlock, Rule, SelectorMap};
|
||||
use selectors::LocalName;
|
||||
|
@ -1201,7 +1202,7 @@ mod tests {
|
|||
let rules_list = get_mock_rules(&["a.intro", "img.sidebar"]);
|
||||
let a = &rules_list[0][0].declarations;
|
||||
let b = &rules_list[1][0].declarations;
|
||||
assert!((a.specificity, a.source_order).cmp(&(b.specificity, b.source_order)) == Less,
|
||||
assert!((a.specificity, a.source_order).cmp(&(b.specificity, b.source_order)) == Ordering::Less,
|
||||
"The rule that comes later should win.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue