From d7fda30d9100fb8544325c087145b99da8612486 Mon Sep 17 00:00:00 2001 From: brooks Date: Mon, 7 Aug 2023 11:37:45 -0400 Subject: [PATCH] Removes `set_no_remove_on_drop()` from AppendVec/AccountsFile --- runtime/src/accounts_file.rs | 9 --------- runtime/src/append_vec.rs | 4 ---- 2 files changed, 13 deletions(-) diff --git a/runtime/src/accounts_file.rs b/runtime/src/accounts_file.rs index d2a37f34151fce..6e3ffd3df881d1 100644 --- a/runtime/src/accounts_file.rs +++ b/runtime/src/accounts_file.rs @@ -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(), diff --git a/runtime/src/append_vec.rs b/runtime/src/append_vec.rs index 4a37a782b964b3..ab098b4b338e48 100644 --- a/runtime/src/append_vec.rs +++ b/runtime/src/append_vec.rs @@ -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(