Don't use move semantics if not needed (#8793)
This commit is contained in:
@ -28,7 +28,7 @@ pub fn load_program<T: Client>(
|
||||
bank_client
|
||||
.send_message(
|
||||
&[from_keypair, &program_keypair],
|
||||
Message::new(vec![instruction]),
|
||||
Message::new(&[instruction]),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@ -37,7 +37,7 @@ pub fn load_program<T: Client>(
|
||||
for chunk in program.chunks(chunk_size) {
|
||||
let instruction =
|
||||
loader_instruction::write(&program_pubkey, loader_pubkey, offset, chunk.to_vec());
|
||||
let message = Message::new_with_payer(vec![instruction], Some(&from_keypair.pubkey()));
|
||||
let message = Message::new_with_payer(&[instruction], Some(&from_keypair.pubkey()));
|
||||
bank_client
|
||||
.send_message(&[from_keypair, &program_keypair], message)
|
||||
.unwrap();
|
||||
@ -45,7 +45,7 @@ pub fn load_program<T: Client>(
|
||||
}
|
||||
|
||||
let instruction = loader_instruction::finalize(&program_pubkey, loader_pubkey);
|
||||
let message = Message::new_with_payer(vec![instruction], Some(&from_keypair.pubkey()));
|
||||
let message = Message::new_with_payer(&[instruction], Some(&from_keypair.pubkey()));
|
||||
bank_client
|
||||
.send_message(&[from_keypair, &program_keypair], message)
|
||||
.unwrap();
|
||||
|
Reference in New Issue
Block a user