From 4f761395d2639e63f4f245670f5c1368b1df5f91 Mon Sep 17 00:00:00 2001 From: Jack May Date: Thu, 11 Jun 2020 19:10:34 -0700 Subject: [PATCH] Adhere to naming conventions (#10530) automerge --- runtime/src/bank.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 7a01388512..a9ad45cb74 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -1304,8 +1304,7 @@ impl Bank { /// Converts Accounts into RefCell, this involves moving /// ownership by draining the source - #[allow(clippy::wrong_self_convention)] - fn into_refcells( + fn accounts_to_refcells( accounts: &mut TransactionAccounts, loaders: &mut TransactionLoaders, ) -> (TransactionAccountRefCells, TransactionLoaderRefCells) { @@ -1326,7 +1325,7 @@ impl Bank { /// Converts back from RefCell to Account, this involves moving /// ownership by draining the sources - fn from_refcells( + fn refcells_to_accounts( accounts: &mut TransactionAccounts, loaders: &mut TransactionLoaders, mut account_refcells: TransactionAccountRefCells, @@ -1402,7 +1401,7 @@ impl Bank { signature_count += u64::from(tx.message().header.num_required_signatures); let (account_refcells, loader_refcells) = - Self::into_refcells(accounts, loaders); + Self::accounts_to_refcells(accounts, loaders); let process_result = self.message_processor.process_message( tx.message(), @@ -1412,7 +1411,12 @@ impl Bank { log_collector, ); - Self::from_refcells(accounts, loaders, account_refcells, loader_refcells); + Self::refcells_to_accounts( + accounts, + loaders, + account_refcells, + loader_refcells, + ); if let Err(TransactionError::InstructionError(_, _)) = &process_result { error_counters.instruction_error += 1;