mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Prefer is_empty
over len
when option is available.
This commit is contained in:
parent
f0122efcec
commit
f62e83c848
1 changed files with 1 additions and 1 deletions
|
@ -401,7 +401,7 @@ pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) ->
|
|||
}
|
||||
|
||||
fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragment>) {
|
||||
if fragments.len() < 1 {
|
||||
if fragments.is_empty() {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue