diff --git a/ledger/src/blockstore_db.rs b/ledger/src/blockstore_db.rs index 184df713ef3a65..e969a2479ef47e 100644 --- a/ledger/src/blockstore_db.rs +++ b/ledger/src/blockstore_db.rs @@ -736,7 +736,7 @@ impl Column for columns::TransactionStatus { fn key((index, signature, slot): (u64, Signature, Slot)) -> Vec { let mut key = vec![0; 8 + 64 + 8]; // size_of u64 + size_of Signature + size_of Slot BigEndian::write_u64(&mut key[0..8], index); - key[8..72].clone_from_slice(&signature.as_ref()[0..64]); + key[8..72].copy_from_slice(&signature.as_ref()[0..64]); BigEndian::write_u64(&mut key[72..80], slot); key } @@ -777,9 +777,9 @@ impl Column for columns::AddressSignatures { fn key((index, pubkey, slot, signature): (u64, Pubkey, Slot, Signature)) -> Vec { let mut key = vec![0; 8 + 32 + 8 + 64]; // size_of u64 + size_of Pubkey + size_of Slot + size_of Signature BigEndian::write_u64(&mut key[0..8], index); - key[8..40].clone_from_slice(&pubkey.as_ref()[0..32]); + key[8..40].copy_from_slice(&pubkey.as_ref()[0..32]); BigEndian::write_u64(&mut key[40..48], slot); - key[48..112].clone_from_slice(&signature.as_ref()[0..64]); + key[48..112].copy_from_slice(&signature.as_ref()[0..64]); key } @@ -812,7 +812,7 @@ impl Column for columns::TransactionMemos { fn key(signature: Signature) -> Vec { let mut key = vec![0; 64]; // size_of Signature - key[0..64].clone_from_slice(&signature.as_ref()[0..64]); + key[0..64].copy_from_slice(&signature.as_ref()[0..64]); key } @@ -905,7 +905,7 @@ impl Column for columns::ProgramCosts { fn key(pubkey: Pubkey) -> Vec { let mut key = vec![0; 32]; // size_of Pubkey - key[0..32].clone_from_slice(&pubkey.as_ref()[0..32]); + key[0..32].copy_from_slice(&pubkey.as_ref()[0..32]); key }