From 6790e4d193fc1609eba4b0c3faf8608e4a0f8521 Mon Sep 17 00:00:00 2001 From: luohy Date: Thu, 3 Aug 2023 13:23:46 +0800 Subject: [PATCH] fix(window-state): fix entry key --- plugins/window-state/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/window-state/src/lib.rs b/plugins/window-state/src/lib.rs index 3ca7a874..bf22124c 100644 --- a/plugins/window-state/src/lib.rs +++ b/plugins/window-state/src/lib.rs @@ -112,11 +112,11 @@ impl AppHandleExt for tauri::AppHandle { } } -fn group_name_by_state(groups: State, label: String) { +fn group_name_by_state(groups: State, label: String) -> String { let binding = groups.0.clone(); let binding = binding.lock().unwrap(); let groups = binding.as_ref(); - let key = group_name(groups, label); + group_name(groups, label) } pub trait WindowExt { @@ -387,7 +387,7 @@ impl Builder { cache .lock() .unwrap() - .entry(key) + .entry(key.clone()) .or_insert_with(WindowState::default); }