solana icon indicating copy to clipboard operation
solana copied to clipboard

Remove unused AppendVecAccountsIter

Open yhchiang-sol opened this issue 1 year ago • 1 comments

Problem

AccountsFile already implements account_iter() where it constructs its own AccountsFileIter based on the get_account() API. As a result, AppendVec::account_iter() and AppendVecAccountsIter are unused.

Summary of Changes

Remove AppendVec::account_iter() and AppendVecAccountsIter.

Test Plan

Existing unit-tests.

yhchiang-sol avatar Feb 01 '24 22:02 yhchiang-sol

Looks like the only place it is used is in the store-tool, but it can be replaced by the AccountsFile API:


error[E0599]: no method named `account_iter` found for struct `ManuallyDrop<solana_accounts_db::append_vec::AppendVec>` in the current scope
--
  | --> accounts-db/store-tool/src/main.rs:48:26
  | \|
  | 48 \|     for account in store.account_iter() {
  | \|                          ^^^^^^^^^^^^ help: there is a method with a similar name: `accounts`


yhchiang-sol avatar Feb 01 '24 22:02 yhchiang-sol