mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
commit
e3eee5a41b
3 changed files with 29 additions and 47 deletions
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue