aboutsummaryrefslogtreecommitdiffstats
path: root/components/fonts/font.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-07-04 16:18:58 +0200
committerGitHub <noreply@github.com>2024-07-04 14:18:58 +0000
commit4b63043c6ae9ca9d51c6139101e294aaef379702 (patch)
treee88cdf1f58308a55dde90ab1d73f72752dcc0fa7 /components/fonts/font.rs
parent99c1f886b8398e73e5af06135f6f357752e2cb16 (diff)
downloadservo-4b63043c6ae9ca9d51c6139101e294aaef379702.tar.gz
servo-4b63043c6ae9ca9d51c6139101e294aaef379702.zip
clippy: Fix warnings in `shared` and `config`, `fonts`, `layout`, and `layout_2020` components (#32674)
Diffstat (limited to 'components/fonts/font.rs')
-rw-r--r--components/fonts/font.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/fonts/font.rs b/components/fonts/font.rs
index 14f5af4197e..918186ecc0c 100644
--- a/components/fonts/font.rs
+++ b/components/fonts/font.rs
@@ -329,8 +329,7 @@ impl Font {
}
}
- let is_single_preserved_newline = text.len() == 1 && text.chars().next() == Some('\n');
-
+ let is_single_preserved_newline = text.len() == 1 && text.starts_with('\n');
let start_time = Instant::now();
let mut glyphs = GlyphStore::new(
text.len(),