Skip to content

Commit

Permalink
Removes set_no_remove_on_drop() from AppendVec/AccountsFile (solana…
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Aug 7, 2023
1 parent 4894eb0 commit df31bc1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions runtime/src/accounts_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ impl AccountsFile {
Ok((Self::AppendVec(av), num_accounts))
}

/// By default, all AccountsFile will remove its underlying file on
/// drop. Calling this function to disable such behavior for this
/// instance.
pub fn set_no_remove_on_drop(&mut self) {
match self {
Self::AppendVec(av) => av.set_no_remove_on_drop(),
}
}

pub fn flush(&self) -> Result<()> {
match self {
Self::AppendVec(av) => av.flush(),
Expand Down
4 changes: 0 additions & 4 deletions runtime/src/append_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ impl AppendVec {
}
}

pub fn set_no_remove_on_drop(&mut self) {
// noop: will be removed next
}

fn sanitize_len_and_size(current_len: usize, file_size: usize) -> Result<()> {
if file_size == 0 {
Err(AccountsFileError::AppendVecError(
Expand Down

0 comments on commit df31bc1

Please sign in to comment.