mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
This commit is contained in:
parent
26045d7fcb
commit
d1b433a3b3
160 changed files with 1427 additions and 1162 deletions
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::ascii::StrAsciiExt;
|
||||
use std::ascii::AsciiExt;
|
||||
use cssparser::parse_rule_list;
|
||||
use cssparser::ast::*;
|
||||
|
||||
|
@ -28,7 +28,7 @@ pub struct MediaQueryList {
|
|||
pub enum Range<T> {
|
||||
Min(T),
|
||||
Max(T),
|
||||
Eq(T),
|
||||
//Eq(T), // FIXME: Implement parsing support for equality then re-enable this.
|
||||
}
|
||||
|
||||
impl<T: Ord> Range<T> {
|
||||
|
@ -36,7 +36,7 @@ impl<T: Ord> Range<T> {
|
|||
match *self {
|
||||
Min(ref width) => { value >= *width },
|
||||
Max(ref width) => { value <= *width },
|
||||
Eq(ref width) => { value == *width },
|
||||
//Eq(ref width) => { value == *width },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ mod tests {
|
|||
assert!(q.expressions.len() == 1, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Min(w)) => assert!(w == Au::from_px(100)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -491,7 +491,7 @@ mod tests {
|
|||
assert!(q.expressions.len() == 1, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Max(w)) => assert!(w == Au::from_px(43)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ mod tests {
|
|||
assert!(q.expressions.len() == 1, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Min(w)) => assert!(w == Au::from_px(100)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -518,7 +518,7 @@ mod tests {
|
|||
assert!(q.expressions.len() == 1, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Max(w)) => assert!(w == Au::from_px(43)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -530,7 +530,7 @@ mod tests {
|
|||
assert!(q.expressions.len() == 1, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Max(w)) => assert!(w == Au::from_px(52)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -545,11 +545,11 @@ mod tests {
|
|||
assert!(q.expressions.len() == 2, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Min(w)) => assert!(w == Au::from_px(100)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
match q.expressions[1] {
|
||||
Width(Max(w)) => assert!(w == Au::from_px(200)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -561,11 +561,11 @@ mod tests {
|
|||
assert!(q.expressions.len() == 2, css.to_string());
|
||||
match q.expressions[0] {
|
||||
Width(Min(w)) => assert!(w == Au::from_px(100)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
match q.expressions[1] {
|
||||
Width(Max(w)) => assert!(w == Au::from_px(200)),
|
||||
_ => fail!("wrong expression type"),
|
||||
_ => panic!("wrong expression type"),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue