diff --git a/accounts-db/src/accounts_file.rs b/accounts-db/src/accounts_file.rs index 54bf8b76cafc55..e962c87331738b 100644 --- a/accounts-db/src/accounts_file.rs +++ b/accounts-db/src/accounts_file.rs @@ -12,11 +12,7 @@ use { }, }, solana_sdk::{account::ReadableAccount, clock::Slot, pubkey::Pubkey}, - std::{ - borrow::Borrow, - mem, - path::{Path, PathBuf}, - }, + std::{borrow::Borrow, mem, path::PathBuf}, thiserror::Error, }; @@ -66,8 +62,8 @@ impl AccountsFile { /// /// The second element of the returned tuple is the number of accounts in the /// accounts file. - pub fn new_from_file(path: impl AsRef, current_len: usize) -> Result<(Self, usize)> { - let (av, num_accounts) = AppendVec::new_from_file(path.as_ref(), current_len)?; + pub fn new_from_file(path: impl Into, current_len: usize) -> Result<(Self, usize)> { + let (av, num_accounts) = AppendVec::new_from_file(path, current_len)?; Ok((Self::AppendVec(av), num_accounts)) }