mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all
This commit is contained in:
parent
b756375637
commit
e8c12c1c6d
17 changed files with 23 additions and 30 deletions
|
@ -628,7 +628,7 @@ pub mod specified {
|
|||
let mut simplified = Vec::new();
|
||||
for product in &node.products {
|
||||
match try!(CalcLengthOrPercentage::simplify_product(product)) {
|
||||
SimplifiedValueNode::Sum(box sum) => simplified.push_all(&sum.values),
|
||||
SimplifiedValueNode::Sum(box sum) => simplified.extend_from_slice(&sum.values),
|
||||
val => simplified.push(val),
|
||||
}
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ pub mod specified {
|
|||
let mut simplified = Vec::new();
|
||||
for ref node in ast.products {
|
||||
match try!(CalcLengthOrPercentage::simplify_product(node)) {
|
||||
SimplifiedValueNode::Sum(sum) => simplified.push_all(&sum.values),
|
||||
SimplifiedValueNode::Sum(sum) => simplified.extend_from_slice(&sum.values),
|
||||
value => simplified.push(value),
|
||||
}
|
||||
}
|
||||
|
@ -751,7 +751,7 @@ pub mod specified {
|
|||
let mut simplified = Vec::new();
|
||||
for ref node in ast.products {
|
||||
match try!(CalcLengthOrPercentage::simplify_product(node)) {
|
||||
SimplifiedValueNode::Sum(sum) => simplified.push_all(&sum.values),
|
||||
SimplifiedValueNode::Sum(sum) => simplified.extend_from_slice(&sum.values),
|
||||
value => simplified.push(value),
|
||||
}
|
||||
}
|
||||
|
@ -778,7 +778,7 @@ pub mod specified {
|
|||
let mut simplified = Vec::new();
|
||||
for ref node in ast.products {
|
||||
match try!(CalcLengthOrPercentage::simplify_product(node)) {
|
||||
SimplifiedValueNode::Sum(sum) => simplified.push_all(&sum.values),
|
||||
SimplifiedValueNode::Sum(sum) => simplified.extend_from_slice(&sum.values),
|
||||
value => simplified.push(value),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue