mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Clean up skip_while iteration
This commit is contained in:
parent
762669b5c6
commit
e5cf89d4f3
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue