chore: cargo +nightly clippy --fix -Z unstable-options
This commit is contained in:
committed by
Michael Vines
parent
3570b00560
commit
6514096a67
@@ -272,15 +272,15 @@ pub(crate) fn resolve_command(
|
||||
Ok(Command::Balance(resolved_args))
|
||||
}
|
||||
Command::Authorize(args) => {
|
||||
let resolved_args = resolve_authorize_args(&mut wallet_manager, &args)?;
|
||||
let resolved_args = resolve_authorize_args(&mut wallet_manager, args)?;
|
||||
Ok(Command::Authorize(resolved_args))
|
||||
}
|
||||
Command::SetLockup(args) => {
|
||||
let resolved_args = resolve_set_lockup_args(&mut wallet_manager, &args)?;
|
||||
let resolved_args = resolve_set_lockup_args(&mut wallet_manager, args)?;
|
||||
Ok(Command::SetLockup(resolved_args))
|
||||
}
|
||||
Command::Rebase(args) => {
|
||||
let resolved_args = resolve_rebase_args(&mut wallet_manager, &args)?;
|
||||
let resolved_args = resolve_rebase_args(&mut wallet_manager, args)?;
|
||||
Ok(Command::Rebase(resolved_args))
|
||||
}
|
||||
Command::Move(args) => {
|
||||
|
@@ -114,7 +114,7 @@ fn process_lockup_stake_accounts(
|
||||
) -> Result<(), ClientError> {
|
||||
let addresses =
|
||||
stake_accounts::derive_stake_account_addresses(&args.base_pubkey, args.num_accounts);
|
||||
let existing_lockups = get_lockups(&client, addresses)?;
|
||||
let existing_lockups = get_lockups(client, addresses)?;
|
||||
|
||||
let lockup = LockupArgs {
|
||||
epoch: args.lockup_epoch,
|
||||
@@ -143,7 +143,7 @@ fn process_rebase_stake_accounts(
|
||||
) -> Result<(), ClientError> {
|
||||
let addresses =
|
||||
stake_accounts::derive_stake_account_addresses(&args.base_pubkey, args.num_accounts);
|
||||
let balances = get_balances(&client, addresses)?;
|
||||
let balances = get_balances(client, addresses)?;
|
||||
|
||||
let messages = stake_accounts::rebase_stake_accounts(
|
||||
&args.fee_payer.pubkey(),
|
||||
@@ -172,7 +172,7 @@ fn process_move_stake_accounts(
|
||||
let args = &move_args.rebase_args;
|
||||
let addresses =
|
||||
stake_accounts::derive_stake_account_addresses(&args.base_pubkey, args.num_accounts);
|
||||
let balances = get_balances(&client, addresses)?;
|
||||
let balances = get_balances(client, addresses)?;
|
||||
|
||||
let messages = stake_accounts::move_stake_accounts(
|
||||
&args.fee_payer.pubkey(),
|
||||
|
@@ -49,7 +49,7 @@ pub(crate) fn new_stake_account(
|
||||
let instructions = stake_instruction::create_account_with_seed(
|
||||
funding_pubkey,
|
||||
&stake_account_address,
|
||||
&base_pubkey,
|
||||
base_pubkey,
|
||||
&index.to_string(),
|
||||
&authorized,
|
||||
&lockup,
|
||||
@@ -66,14 +66,14 @@ fn authorize_stake_accounts_instructions(
|
||||
new_withdraw_authority_pubkey: &Pubkey,
|
||||
) -> Vec<Instruction> {
|
||||
let instruction0 = stake_instruction::authorize(
|
||||
&stake_account_address,
|
||||
stake_account_address,
|
||||
stake_authority_pubkey,
|
||||
new_stake_authority_pubkey,
|
||||
StakeAuthorize::Staker,
|
||||
None,
|
||||
);
|
||||
let instruction1 = stake_instruction::authorize(
|
||||
&stake_account_address,
|
||||
stake_account_address,
|
||||
withdraw_authority_pubkey,
|
||||
new_withdraw_authority_pubkey,
|
||||
StakeAuthorize::Withdrawer,
|
||||
@@ -102,7 +102,7 @@ fn rebase_stake_account(
|
||||
new_base_pubkey,
|
||||
&i.to_string(),
|
||||
);
|
||||
let message = Message::new(&instructions, Some(&fee_payer_pubkey));
|
||||
let message = Message::new(&instructions, Some(fee_payer_pubkey));
|
||||
Some(message)
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ fn move_stake_account(
|
||||
);
|
||||
|
||||
instructions.extend(authorize_instructions.into_iter());
|
||||
let message = Message::new(&instructions, Some(&fee_payer_pubkey));
|
||||
let message = Message::new(&instructions, Some(fee_payer_pubkey));
|
||||
Some(message)
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ pub(crate) fn authorize_stake_accounts(
|
||||
new_stake_authority_pubkey,
|
||||
new_withdraw_authority_pubkey,
|
||||
);
|
||||
Message::new(&instructions, Some(&fee_payer_pubkey))
|
||||
Message::new(&instructions, Some(fee_payer_pubkey))
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
@@ -223,7 +223,7 @@ pub(crate) fn lockup_stake_accounts(
|
||||
return None;
|
||||
}
|
||||
let instruction = stake_instruction::set_lockup(address, &lockup, custodian_pubkey);
|
||||
let message = Message::new(&[instruction], Some(&fee_payer_pubkey));
|
||||
let message = Message::new(&[instruction], Some(fee_payer_pubkey));
|
||||
Some(message)
|
||||
})
|
||||
.collect()
|
||||
@@ -306,7 +306,7 @@ mod tests {
|
||||
) -> Keypair {
|
||||
let fee_payer_keypair = Keypair::new();
|
||||
client
|
||||
.transfer_and_confirm(lamports, &funding_keypair, &fee_payer_keypair.pubkey())
|
||||
.transfer_and_confirm(lamports, funding_keypair, &fee_payer_keypair.pubkey())
|
||||
.unwrap();
|
||||
fee_payer_keypair
|
||||
}
|
||||
@@ -316,7 +316,7 @@ mod tests {
|
||||
base_pubkey: &Pubkey,
|
||||
i: usize,
|
||||
) -> AccountSharedData {
|
||||
let account_address = derive_stake_account_address(&base_pubkey, i);
|
||||
let account_address = derive_stake_account_address(base_pubkey, i);
|
||||
AccountSharedData::from(client.get_account(&account_address).unwrap().unwrap())
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ mod tests {
|
||||
) -> Vec<(Pubkey, u64)> {
|
||||
(0..num_accounts)
|
||||
.map(|i| {
|
||||
let address = derive_stake_account_address(&base_pubkey, i);
|
||||
let address = derive_stake_account_address(base_pubkey, i);
|
||||
(address, client.get_balance(&address).unwrap())
|
||||
})
|
||||
.collect()
|
||||
@@ -340,7 +340,7 @@ mod tests {
|
||||
) -> Vec<(Pubkey, Lockup)> {
|
||||
(0..num_accounts)
|
||||
.map(|i| {
|
||||
let address = derive_stake_account_address(&base_pubkey, i);
|
||||
let address = derive_stake_account_address(base_pubkey, i);
|
||||
let account =
|
||||
AccountSharedData::from(client.get_account(&address).unwrap().unwrap());
|
||||
(address, stake_state::lockup_from(&account).unwrap())
|
||||
|
Reference in New Issue
Block a user