Skip to content
Permalink
Browse files

Clean up skip_while iteration

  • Loading branch information
brendanzab committed Jun 20, 2014
1 parent 762669b commit e5cf89d4f3eb718aa5abf9a2ad22813d0a1d2985
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/components/main/layout/inline.rs
@@ -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);

0 comments on commit e5cf89d

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