mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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![])
|
let new_fragments = mem::replace(&mut self.fragments, vec![])
|
||||||
.move_iter()
|
.move_iter()
|
||||||
.skip_while(|fragment| {
|
.skip_while(|fragment| {
|
||||||
if fragment.is_whitespace_only() {
|
let is_whitespace_only = fragment.is_whitespace_only();
|
||||||
debug!("stripping ignorable whitespace from start"); true
|
if is_whitespace_only {
|
||||||
} else { false }
|
debug!("stripping ignorable whitespace from start");
|
||||||
|
}
|
||||||
|
is_whitespace_only
|
||||||
}).collect();
|
}).collect();
|
||||||
|
|
||||||
self.fixup(new_fragments);
|
self.fixup(new_fragments);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue