From 6734d183594ebf89b8e6c030ea69d53ecb6b72db Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 29 Jul 2024 00:54:23 +0200 Subject: Simplify `focus` method in `text_editor` --- widget/src/text_editor.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'widget/src/text_editor.rs') diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index bc391be3..a264ba06 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -424,13 +424,7 @@ impl operation::Focusable } fn focus(&mut self) { - let now = Instant::now(); - - self.focus = Some(Focus { - updated_at: now, - now, - is_window_focused: true, - }); + self.focus = Some(Focus::now()); } fn unfocus(&mut self) { -- cgit