From 6734d183594ebf89b8e6c030ea69d53ecb6b72db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Mon, 29 Jul 2024 00:54:23 +0200 Subject: [PATCH] Simplify `focus` method in `text_editor` --- 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 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) {