mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -814,7 +814,7 @@ fn interpolate_transform_list(from_list: &[TransformOperation],
|
|||
}
|
||||
} else {
|
||||
// TODO(gw): Implement matrix decomposition and interpolation
|
||||
result.push_all(from_list);
|
||||
result.extend_from_slice(from_list);
|
||||
}
|
||||
|
||||
TransformList(Some(result))
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#![feature(custom_attribute)]
|
||||
#![feature(custom_derive)]
|
||||
#![feature(plugin)]
|
||||
#![feature(vec_push_all)]
|
||||
|
||||
#![plugin(serde_macros)]
|
||||
#![plugin(serde_macros)]
|
||||
|
|
|
@ -87,7 +87,7 @@ impl Stylesheet {
|
|||
let mut bytes = vec![];
|
||||
// TODO: incremental decoding and tokenization/parsing
|
||||
for chunk in input {
|
||||
bytes.push_all(&chunk)
|
||||
bytes.extend_from_slice(&chunk)
|
||||
}
|
||||
Stylesheet::from_bytes(&bytes, base_url, protocol_encoding_label,
|
||||
environment_encoding, origin, error_reporter)
|
||||
|
|
|
@ -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