auto merge of #5268 : mbrubeck/servo/append, r=jdm

The new `Vec::append` method is clearer and potentially faster.
This commit is contained in:
bors-servo 2015-03-18 21:39:49 -06:00
commit 646f821479
2 changed files with 4 additions and 4 deletions

View file

@ -743,8 +743,8 @@ impl InlineFragments {
}
/// Merges another set of inline fragments with this one.
pub fn push_all(&mut self, fragments: InlineFragments) {
self.fragments.extend(fragments.fragments.into_iter());
pub fn push_all(&mut self, mut other: InlineFragments) {
self.fragments.append(&mut other.fragments);
}
/// A convenience function to return the fragment at a given index.

View file

@ -73,9 +73,9 @@ fn main() {
match maybe_extension {
Some(extension) => {
if extension.to_ascii_lowercase().as_slice() == "list" && file.is_file() {
let tests = parse_lists(&file, servo_args, render_mode, all_tests.len());
let mut tests = parse_lists(&file, servo_args, render_mode, all_tests.len());
println!("\t{} [{} tests]", file.display(), tests.len());
all_tests.extend(tests.into_iter());
all_tests.append(&mut tests);
}
}
_ => {}