Skip to content

Commit

Permalink
Uses Into<PathBuf> for path in AccountsFile::new_from_file() (solana-…
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Mar 26, 2024
1 parent 24c55f3 commit 21fbde7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions accounts-db/src/accounts_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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<Path>, 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<PathBuf>, current_len: usize) -> Result<(Self, usize)> {
let (av, num_accounts) = AppendVec::new_from_file(path, current_len)?;
Ok((Self::AppendVec(av), num_accounts))
}

Expand Down

0 comments on commit 21fbde7

Please sign in to comment.