Removes `set_no_remove_on_drop()` from AppendVec/AccountsFile (#32742)
This commit is contained in:
parent
4894eb0333
commit
df31bc13db
|
@ -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(),
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue