Auto merge of #8597 - r0e:testing, r=Manishearth

Fix for #8593 'loop..match' should be 'while let'

As per #8593.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8597)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-23 08:18:20 +05:30
commit e3eee5a41b
3 changed files with 29 additions and 47 deletions

View file

@ -524,18 +524,17 @@ pub mod specified {
let mut products = Vec::new();
products.push(try!(CalcLengthOrPercentage::parse_product(input, expected_unit)));
loop {
match input.next() {
Ok(Token::Delim('+')) => {
while let Ok(token) = input.next() {
match token {
Token::Delim('+') => {
products.push(try!(CalcLengthOrPercentage::parse_product(input, expected_unit)));
}
Ok(Token::Delim('-')) => {
Token::Delim('-') => {
let mut right = try!(CalcLengthOrPercentage::parse_product(input, expected_unit));
right.values.push(CalcValueNode::Number(-1.));
products.push(right);
}
Ok(_) => return Err(()),
_ => break
_ => return Err(())
}
}