aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
diff options
context:
space:
mode:
author石蕊 (Pi-Cla) <pirateclip@protonmail.com>2024-07-09 04:47:43 +0000
committerGitHub <noreply@github.com>2024-07-09 04:47:43 +0000
commitf29dd64a7b633e844756e6eecf9e05e0b327fc51 (patch)
tree728bc5da636d9c69fe2d217184e7ccecc4ae017f /components/script/textinput.rs
parent4e1f623666e6ba3ffe7fe2d86564885260d8f65a (diff)
downloadservo-f29dd64a7b633e844756e6eecf9e05e0b327fc51.tar.gz
servo-f29dd64a7b633e844756e6eecf9e05e0b327fc51.zip
Fix more clippy (#32740)
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r--components/script/textinput.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs
index a15d25ed4e0..19c85979ffa 100644
--- a/components/script/textinput.rs
+++ b/components/script/textinput.rs
@@ -982,7 +982,7 @@ impl<T: ClipboardProvider> TextInput<T> {
/// Whether the content is empty.
pub fn is_empty(&self) -> bool {
- self.lines.len() <= 1 && self.lines.get(0).map_or(true, |line| line.is_empty())
+ self.lines.len() <= 1 && self.lines.first().map_or(true, |line| line.is_empty())
}
/// The length of the content in bytes.