Use append instead of extend where possible

The new `Vec::append` method is clearer and potentially faster.
This commit is contained in:
Matt Brubeck 2015-03-18 17:17:33 -07:00
parent 6ef9cb4e18
commit 94a7563aea
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.