@@ -44,7 +44,7 @@ struct Properties {
4444}
4545
4646impl Properties {
47- fn for_lock ( keyring : & str , window_id : Option < WindowIdentifierType > ) -> Self {
47+ fn for_lock ( keyring : & str , window_id : Option < & WindowIdentifierType > ) -> Self {
4848 Self {
4949 title : None ,
5050 message : Some ( "Lock Keyring" . to_owned ( ) ) ,
@@ -54,7 +54,7 @@ impl Properties {
5454 password_strength : None ,
5555 choice_label : None ,
5656 choice_chosen : None ,
57- caller_window : window_id,
57+ caller_window : window_id. map ( ToOwned :: to_owned ) ,
5858 continue_label : Some ( "Lock" . to_owned ( ) ) ,
5959 cancel_label : Some ( "Cancel" . to_owned ( ) ) ,
6060 }
@@ -63,7 +63,7 @@ impl Properties {
6363 fn for_unlock (
6464 keyring : & str ,
6565 warning : Option < & str > ,
66- window_id : Option < WindowIdentifierType > ,
66+ window_id : Option < & WindowIdentifierType > ,
6767 ) -> Self {
6868 Self {
6969 title : Some ( "Unlock Keyring" . to_owned ( ) ) ,
@@ -77,7 +77,7 @@ impl Properties {
7777 password_strength : None ,
7878 choice_label : None ,
7979 choice_chosen : None ,
80- caller_window : window_id,
80+ caller_window : window_id. map ( ToOwned :: to_owned ) ,
8181 continue_label : Some ( "Unlock" . to_owned ( ) ) ,
8282 cancel_label : Some ( "Cancel" . to_owned ( ) ) ,
8383 }
@@ -240,7 +240,7 @@ impl PrompterCallback {
240240
241241 let ( properties, prompt_type) = match prompt. role ( ) {
242242 PromptRole :: Lock => (
243- Properties :: for_lock ( & label, self . window_id . clone ( ) ) ,
243+ Properties :: for_lock ( & label, self . window_id . as_ref ( ) ) ,
244244 PromptType :: Confirm ,
245245 ) ,
246246 PromptRole :: Unlock => {
@@ -254,7 +254,7 @@ impl PrompterCallback {
254254 self . aes_key . set ( aes_key) . unwrap ( ) ;
255255
256256 (
257- Properties :: for_unlock ( & label, None , self . window_id . clone ( ) ) ,
257+ Properties :: for_unlock ( & label, None , self . window_id . as_ref ( ) ) ,
258258 PromptType :: Password ,
259259 )
260260 }
@@ -308,7 +308,7 @@ impl PrompterCallback {
308308 let properties = Properties :: for_unlock (
309309 & label,
310310 Some ( "The unlock password was incorrect" ) ,
311- self . window_id . clone ( ) ,
311+ self . window_id . as_ref ( ) ,
312312 ) ;
313313 let server_exchange = self
314314 . exchange
0 commit comments