File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -334,19 +334,15 @@ impl SsCredential {
334334 let session_type = EncryptionType :: Dh ;
335335 #[ cfg( not( any( feature = "crypto-rust" , feature = "crypto-openssl" ) ) ) ]
336336 let session_type = EncryptionType :: Plain ;
337-
338337 let ss = SecretService :: connect ( session_type) . map_err ( platform_failure) ?;
339-
340338 let attrs: HashMap < & str , & str > = self . search_attributes ( false ) . into_iter ( ) . collect ( ) ;
341339 let search = ss. search_items ( attrs) . map_err ( decode_error) ?;
342340 let count = search. locked . len ( ) + search. unlocked . len ( ) ;
343-
344341 if count == 0 {
345342 if let Some ( "default" ) = self . target . as_deref ( ) {
346343 return self . map_matching_legacy_items ( & ss, f, require_unique) ;
347344 }
348345 }
349-
350346 if require_unique {
351347 if count == 0 {
352348 return Err ( ErrorCode :: NoEntry ) ;
@@ -359,7 +355,6 @@ impl SsCredential {
359355 return Err ( ErrorCode :: Ambiguous ( creds) ) ;
360356 }
361357 }
362-
363358 let mut results: Vec < T > = vec ! [ ] ;
364359 for item in search. unlocked . iter ( ) {
365360 results. push ( f ( item) ?) ;
@@ -368,7 +363,6 @@ impl SsCredential {
368363 item. unlock ( ) . map_err ( decode_error) ?;
369364 results. push ( f ( item) ?) ;
370365 }
371-
372366 Ok ( results)
373367 }
374368
You can’t perform that action at this time.
0 commit comments