aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
diff options
context:
space:
mode:
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.