From a11616fdf604f1c0b3bc3e1b2c1a1106ca3a3017 Mon Sep 17 00:00:00 2001 From: Michael Freeborn Date: Fri, 21 Nov 2025 09:02:26 +0000 Subject: [PATCH] defer to underlying trait method instead --- widget/src/text_editor.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 6a48e3fa..d4f02565 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -475,13 +475,7 @@ where /// Returns whether or not the the [`Content`] is empty. pub fn is_empty(&self) -> bool { - let editor = &self.0.borrow().editor; - - match editor.line_count() { - 0 => true, - 1 => editor.line(0).map(|l| l.text.is_empty()).unwrap_or(true), - _ => false, - } + self.0.borrow().editor.is_empty() } }