Skip to content

Commit 07b5ad3

Browse files
committed
Use clone
1 parent dfff829 commit 07b5ad3

File tree

1 file changed

+2
-1
lines changed
  • sdk/pinocchio/src/entrypoint

1 file changed

+2
-1
lines changed

sdk/pinocchio/src/entrypoint/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,15 @@ macro_rules! process_accounts {
281281
//
282282
// Note: The function is marked as `cold` to stop the compiler from optimizing the parsing of
283283
// duplicated accounts, which leads to an overall increase in CU consumption.
284+
#[allow(clippy::clone_on_copy)]
284285
#[cold]
285286
#[inline(always)]
286287
unsafe fn clone_account_info(
287288
accounts: *mut AccountView,
288289
accounts_slice: *const AccountView,
289290
index: u8,
290291
) {
291-
accounts.write(*accounts_slice.add(index as usize));
292+
accounts.write((*accounts_slice.add(index as usize)).clone());
292293
}
293294

294295
/// Parse the arguments from the runtime input buffer.

0 commit comments

Comments
 (0)