mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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;
|
||||
continue
|
||||
}
|
||||
new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
|
||||
// Finished processing leading control chars and whitespace.
|
||||
if modified {
|
||||
new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
|
||||
}
|
||||
break
|
||||
}
|
||||
if modified {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue