From d45d00e22abe1f6ec36fe19df65d7b26d320c588 Mon Sep 17 00:00:00 2001
From: "Jeff Washington (jwash)"
 <75863576+jeffwashington@users.noreply.github.com>
Date: Wed, 2 Jun 2021 14:03:02 -0500
Subject: [PATCH] reduce copy (#17672)

(cherry picked from commit d802eb303cdebd4a08130bd72e9c9d94cc3371e9)
---
 runtime/src/accounts_db.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs
index 5c37850f488c7f..e7d7fd1cd77fa9 100644
--- a/runtime/src/accounts_db.rs
+++ b/runtime/src/accounts_db.rs
@@ -4312,7 +4312,7 @@ impl AccountsDb {
             |loaded_account: LoadedAccount,
              accum: &mut Vec<Vec<CalculateHashIntermediate>>,
              slot: Slot| {
-                let pubkey = *loaded_account.pubkey();
+                let pubkey = loaded_account.pubkey();
                 let pubkey_to_bin_index = pubkey.as_ref()[0] as usize * bins / max_plus_1;
                 if !bin_range.contains(&pubkey_to_bin_index) {
                     return;
@@ -4332,7 +4332,7 @@ impl AccountsDb {
                     loaded_account.loaded_hash(),
                     balance,
                     slot,
-                    pubkey,
+                    *pubkey,
                 );
 
                 if check_hash {