chore: cargo +nightly clippy --fix -Z unstable-options

This commit is contained in:
Alexander Meißner
2021-06-18 15:34:46 +02:00
committed by Michael Vines
parent 3570b00560
commit 6514096a67
177 changed files with 1021 additions and 1021 deletions

View File

@@ -972,7 +972,7 @@ pub fn process_create_stake_account(
) -> ProcessResult {
let stake_account = config.signers[stake_account];
let stake_account_address = if let Some(seed) = seed {
Pubkey::create_with_seed(&stake_account.pubkey(), &seed, &stake::program::id())?
Pubkey::create_with_seed(&stake_account.pubkey(), seed, &stake::program::id())?
} else {
stake_account.pubkey()
};
@@ -1085,7 +1085,7 @@ pub fn process_create_stake_account(
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
log_instruction_custom_error::<SystemError>(result, &config)
log_instruction_custom_error::<SystemError>(result, config)
}
}
@@ -1172,7 +1172,7 @@ pub fn process_stake_authorize(
} else {
rpc_client.send_and_confirm_transaction_with_spinner(&tx)
};
log_instruction_custom_error::<StakeError>(result, &config)
log_instruction_custom_error::<StakeError>(result, config)
}
}
@@ -1196,7 +1196,7 @@ pub fn process_deactivate_stake_account(
let stake_authority = config.signers[stake_authority];
let stake_account_address = if let Some(seed) = seed {
Pubkey::create_with_seed(&stake_account_pubkey, seed, &stake::program::id())?
Pubkey::create_with_seed(stake_account_pubkey, seed, &stake::program::id())?
} else {
*stake_account_pubkey
};
@@ -1248,7 +1248,7 @@ pub fn process_deactivate_stake_account(
config.commitment,
)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
log_instruction_custom_error::<StakeError>(result, &config)
log_instruction_custom_error::<StakeError>(result, config)
}
}
@@ -1274,7 +1274,7 @@ pub fn process_withdraw_stake(
let custodian = custodian.map(|index| config.signers[index]);
let stake_account_address = if let Some(seed) = seed {
Pubkey::create_with_seed(&stake_account_pubkey, seed, &stake::program::id())?
Pubkey::create_with_seed(stake_account_pubkey, seed, &stake::program::id())?
} else {
*stake_account_pubkey
};
@@ -1347,7 +1347,7 @@ pub fn process_withdraw_stake(
config.commitment,
)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
log_instruction_custom_error::<SystemError>(result, &config)
log_instruction_custom_error::<SystemError>(result, config)
}
}
@@ -1382,10 +1382,10 @@ pub fn process_split_stake(
}
check_unique_pubkeys(
(&fee_payer.pubkey(), "fee-payer keypair".to_string()),
(&stake_account_pubkey, "stake_account".to_string()),
(stake_account_pubkey, "stake_account".to_string()),
)?;
check_unique_pubkeys(
(&stake_account_pubkey, "stake_account".to_string()),
(stake_account_pubkey, "stake_account".to_string()),
(
&split_stake_account.pubkey(),
"split_stake_account".to_string(),
@@ -1395,7 +1395,7 @@ pub fn process_split_stake(
let stake_authority = config.signers[stake_authority];
let split_stake_account_address = if let Some(seed) = split_stake_account_seed {
Pubkey::create_with_seed(&split_stake_account.pubkey(), &seed, &stake::program::id())?
Pubkey::create_with_seed(&split_stake_account.pubkey(), seed, &stake::program::id())?
} else {
split_stake_account.pubkey()
};
@@ -1433,7 +1433,7 @@ pub fn process_split_stake(
let ixs = if let Some(seed) = split_stake_account_seed {
stake_instruction::split_with_seed(
&stake_account_pubkey,
stake_account_pubkey,
&stake_authority.pubkey(),
lamports,
&split_stake_account_address,
@@ -1443,7 +1443,7 @@ pub fn process_split_stake(
.with_memo(memo)
} else {
stake_instruction::split(
&stake_account_pubkey,
stake_account_pubkey,
&stake_authority.pubkey(),
lamports,
&split_stake_account_address,
@@ -1492,7 +1492,7 @@ pub fn process_split_stake(
config.commitment,
)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
log_instruction_custom_error::<StakeError>(result, &config)
log_instruction_custom_error::<StakeError>(result, config)
}
}
@@ -1515,19 +1515,19 @@ pub fn process_merge_stake(
check_unique_pubkeys(
(&fee_payer.pubkey(), "fee-payer keypair".to_string()),
(&stake_account_pubkey, "stake_account".to_string()),
(stake_account_pubkey, "stake_account".to_string()),
)?;
check_unique_pubkeys(
(&fee_payer.pubkey(), "fee-payer keypair".to_string()),
(
&source_stake_account_pubkey,
source_stake_account_pubkey,
"source_stake_account".to_string(),
),
)?;
check_unique_pubkeys(
(&stake_account_pubkey, "stake_account".to_string()),
(stake_account_pubkey, "stake_account".to_string()),
(
&source_stake_account_pubkey,
source_stake_account_pubkey,
"source_stake_account".to_string(),
),
)?;
@@ -1552,8 +1552,8 @@ pub fn process_merge_stake(
blockhash_query.get_blockhash_and_fee_calculator(rpc_client, config.commitment)?;
let ixs = stake_instruction::merge(
&stake_account_pubkey,
&source_stake_account_pubkey,
stake_account_pubkey,
source_stake_account_pubkey,
&stake_authority.pubkey(),
)
.with_memo(memo);
@@ -1603,7 +1603,7 @@ pub fn process_merge_stake(
config.commitment,
config.send_transaction_config,
);
log_instruction_custom_error::<StakeError>(result, &config)
log_instruction_custom_error::<StakeError>(result, config)
}
}
@@ -1674,7 +1674,7 @@ pub fn process_stake_set_lockup(
config.commitment,
)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
log_instruction_custom_error::<StakeError>(result, &config)
log_instruction_custom_error::<StakeError>(result, config)
}
}
@@ -2076,7 +2076,7 @@ pub fn process_delegate_stake(
config.commitment,
)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
log_instruction_custom_error::<StakeError>(result, &config)
log_instruction_custom_error::<StakeError>(result, config)
}
}