mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Prevent unnecessary copying in strip_leading_whitespace_if_necessary
This commit is contained in:
parent
cac06e579c
commit
66806229ad
1 changed files with 4 additions and 1 deletions
|
@ -2344,7 +2344,10 @@ impl Fragment {
|
||||||
modified = true;
|
modified = true;
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// Finished processing leading control chars and whitespace.
|
||||||
|
if modified {
|
||||||
new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
|
new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if modified {
|
if modified {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue