Removes `set_no_remove_on_drop()` from AppendVec/AccountsFile (#32742)

This commit is contained in:
Brooks 2023-08-07 17:48:31 -04:00 committed by GitHub
parent 4894eb0333
commit df31bc13db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 13 deletions

View File

@ -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(),

View File

@ -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(