auto merge of #4904 : mbrubeck/servo/dlist, r=pcwalton

r? @pcwalton
This commit is contained in:
bors-servo 2015-02-12 16:39:53 -07:00
commit 26aee53c82
3 changed files with 17 additions and 119 deletions

View file

@ -50,13 +50,13 @@ impl TextRunScanner {
let mut last_whitespace = true;
while !fragments.is_empty() {
// Create a clump.
self.clump.append(&mut dlist::split(&mut fragments));
self.clump.append(&mut dlist::split_off_head(&mut fragments));
while !fragments.is_empty() && self.clump
.back()
.unwrap()
.can_merge_with_fragment(fragments.front()
.unwrap()) {
self.clump.append(&mut dlist::split(&mut fragments));
self.clump.append(&mut dlist::split_off_head(&mut fragments));
}
// Flush that clump to the list of fragments we're building up.