Skip to content

Commit

Permalink
Clean up skip_while iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanzab committed Jun 20, 2014
1 parent 762669b commit e5cf89d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/main/layout/inline.rs
Expand Up @@ -862,9 +862,11 @@ impl InlineFragments {
let new_fragments = mem::replace(&mut self.fragments, vec![])
.move_iter()
.skip_while(|fragment| {
if fragment.is_whitespace_only() {
debug!("stripping ignorable whitespace from start"); true
} else { false }
let is_whitespace_only = fragment.is_whitespace_only();
if is_whitespace_only {
debug!("stripping ignorable whitespace from start");
}
is_whitespace_only
}).collect();

self.fixup(new_fragments);
Expand Down

0 comments on commit e5cf89d

Please sign in to comment.