Make dlist::split use new DList::split_off.

This commit is contained in:
Matt Brubeck 2015-02-12 10:41:01 -08:00
parent 76a2653f8f
commit 04fb3a5267
2 changed files with 9 additions and 63 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.