Skip to content
Permalink
Browse files

Use destructuring to clean up InlineFragments::push_all

  • Loading branch information
brendanzab committed Jun 2, 2014
1 parent 782608e commit 0276ae47a26e6932dd2f531445988bd54f611706
Showing with 3 additions and 7 deletions.
  1. +3 −7 src/components/main/layout/inline.rs
@@ -703,14 +703,10 @@ impl InlineFragments {
}

/// Merges another set of inline fragments with this one.
pub fn push_all(&mut self, other: InlineFragments) {
let InlineFragments {
fragments: other_fragments,
ranges: other_ranges,
} = other;
pub fn push_all(&mut self, InlineFragments { fragments, ranges }: InlineFragments) {
let adjustment = FragmentIndex(self.fragments.len() as int);
self.push_all_ranges(other_ranges, adjustment);
self.fragments.push_all_move(other_fragments);
self.push_all_ranges(ranges, adjustment);
self.fragments.push_all_move(fragments);
}

/// Returns an iterator that iterates over all fragments along with the appropriate context.

5 comments on commit 0276ae4

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jun 2, 2014

saw approval from pcwalton
at brendanzab@0276ae4

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jun 2, 2014

merging bjz/servo/remove-inline-fragment-map = 0276ae4 into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jun 2, 2014

bjz/servo/remove-inline-fragment-map = 0276ae4 merged ok, testing candidate = 184d8b5

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jun 3, 2014

fast-forwarding master to auto = 184d8b5

Please sign in to comment.
You can’t perform that action at this time.