File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ impl Keyring {
559559 }
560560 }
561561 let n_broken_items = broken_items. len ( ) ;
562- for index in broken_items {
562+ for index in broken_items. into_iter ( ) . rev ( ) {
563563 keyring. items . remove ( index) ;
564564 }
565565 drop ( keyring) ;
@@ -848,8 +848,8 @@ mod tests {
848848 let keyring_path = v1_dir. join ( "default.keyring" ) ;
849849 fs:: copy ( & fixture_path, & keyring_path) . await ?;
850850
851- // 1) Load with the correct password and add several valid items.
852- // This ensures n_valid_items > n_broken_items that we'll add later.
851+ // 1) Load with the correct password and add several valid items. This ensures
852+ // n_valid_items > n_broken_items that we'll add later.
853853 let keyring = Keyring :: load ( & keyring_path, Secret :: blob ( "test" ) ) . await ?;
854854 for i in 0 ..VALID_TO_ADD {
855855 keyring
@@ -896,7 +896,6 @@ mod tests {
896896 Ok ( ( ) )
897897 }
898898
899-
900899 #[ tokio:: test]
901900 async fn change_secret ( ) -> Result < ( ) , Error > {
902901 let data_dir = tempdir ( ) ?;
You can’t perform that action at this time.
0 commit comments