Skip to content

Commit 2b6b572

Browse files
committed
Use clone
1 parent 625eac9 commit 2b6b572

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
@@ -282,14 +282,15 @@ macro_rules! process_accounts {
282282
//
283283
// Note: The function is marked as `cold` to stop the compiler from optimizing the parsing of
284284
// duplicated accounts, which leads to an overall increase in CU consumption.
285+
#[allow(clippy::clone_on_copy)]
285286
#[cold]
286287
#[inline(always)]
287288
unsafe fn clone_account_info(
288289
accounts: *mut AccountView,
289290
accounts_slice: *const AccountView,
290291
index: u8,
291292
) {
292-
accounts.write(*accounts_slice.add(index as usize));
293+
accounts.write((*accounts_slice.add(index as usize)).clone());
293294
}
294295

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

0 commit comments

Comments
 (0)