mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix for #8593 'loop..match' should be 'while let'
changed line 641 of constellation.rs to while let added while let at line 1201 in constellation.rs added while let to line 1199 in block.rs
This commit is contained in:
parent
a5babb89a0
commit
99acd46c48
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