From d121c3ca79de4e6e9baad25c63e8e29aff87e860 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 24 Sep 2024 21:36:29 +0300 Subject: [PATCH] use common getter --- src/browser/main/tab/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/browser/main/tab/mod.rs b/src/browser/main/tab/mod.rs index 32a5d555..6ed67017 100644 --- a/src/browser/main/tab/mod.rs +++ b/src/browser/main/tab/mod.rs @@ -42,8 +42,9 @@ impl Tab { // Begin async action move |_, widget: &Widget, _| { // Cleanup HashMap index - tab.labels.borrow_mut().remove(&widget.widget_name()); - tab.pages.borrow_mut().remove(&widget.widget_name()); + let id = &widget.widget_name(); + tab.labels.borrow_mut().remove(id); + tab.pages.borrow_mut().remove(id); } });