mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Switch .len()
comparison to is_empty()
in components/layout_2020/query.rs
. (#33544)
* Improve readability of code Signed-off-by: Daniel Frantes <danfrantes@seznam.cz> * Fix style issue Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Daniel Frantes <danfrantes@seznam.cz> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ac567645a7
commit
6725f716e7
1 changed files with 1 additions and 1 deletions
|
@ -741,7 +741,7 @@ fn rendered_text_collection_steps<'dom>(
|
|||
items.push(InnerOrOuterTextItem::Text(String::from(" ")));
|
||||
};
|
||||
|
||||
if transformed_text.len() > 0 {
|
||||
if !transformed_text.is_empty() {
|
||||
// Here we decide whether to keep or truncate the final white
|
||||
// space character, if there is one.
|
||||
if is_final_character_whitespace && !is_preformatted_element {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue