clippy: Remove `useless_conversion` (#3899)
This commit is contained in:
parent
77a297c2c7
commit
5f4943802b
|
@ -5924,7 +5924,6 @@ name = "spl-feature-proposal"
|
|||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"borsh",
|
||||
"borsh-derive",
|
||||
"solana-program",
|
||||
"solana-program-test",
|
||||
"solana-sdk",
|
||||
|
|
|
@ -13,7 +13,6 @@ test-sbf = []
|
|||
|
||||
[dependencies]
|
||||
borsh = "0.9"
|
||||
borsh-derive = "0.9.0"
|
||||
solana-program = "1.14.10"
|
||||
spl-token = { version = "3.5", path = "../../token/program", features = ["no-entrypoint"] }
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ impl ProgramTestBench {
|
|||
|
||||
transaction.sign(&all_signers, recent_blockhash);
|
||||
|
||||
#[allow(clippy::useless_conversion)] // Remove during upgrade to 1.10
|
||||
self.context
|
||||
.banks_client
|
||||
.process_transaction(transaction)
|
||||
|
|
|
@ -199,7 +199,6 @@ pub async fn sign_send_instruction(
|
|||
payer_signers.push(s);
|
||||
}
|
||||
transaction.partial_sign(&payer_signers, ctx.last_blockhash);
|
||||
#[allow(clippy::useless_conversion)] // Remove during upgrade to 1.10
|
||||
ctx.banks_client
|
||||
.process_transaction(transaction)
|
||||
.await
|
||||
|
|
|
@ -143,14 +143,12 @@ async fn fail_on_invalid_mint() {
|
|||
&[&ctx.payer, &account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(
|
||||
|
|
|
@ -88,14 +88,12 @@ async fn fail_extension_no_space() {
|
|||
&[&ctx.payer, &mint_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(1, InstructionError::InvalidAccountData)
|
||||
|
@ -141,14 +139,12 @@ async fn fail_extension_after_mint_init() {
|
|||
&[&ctx.payer, &mint_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(1, InstructionError::InvalidAccountData)
|
||||
|
@ -221,14 +217,12 @@ async fn fail_init_overallocated_mint() {
|
|||
&[&ctx.payer, &mint_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(1, InstructionError::InvalidAccountData)
|
||||
|
@ -291,14 +285,12 @@ async fn fail_account_init_after_mint_extension() {
|
|||
&[&ctx.payer, &mint_account, &token_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(
|
||||
|
@ -348,14 +340,12 @@ async fn fail_account_init_after_mint_init() {
|
|||
&[&ctx.payer, &mint_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(2, InstructionError::InvalidAccountData)
|
||||
|
@ -408,14 +398,12 @@ async fn fail_account_init_after_mint_init_with_extension() {
|
|||
&[&ctx.payer, &mint_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(3, InstructionError::InvalidAccountData)
|
||||
|
@ -464,14 +452,12 @@ async fn fail_fee_init_after_mint_init() {
|
|||
&[&ctx.payer, &mint_account],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
err,
|
||||
TransactionError::InstructionError(1, InstructionError::InvalidAccountData)
|
||||
|
|
|
@ -100,14 +100,12 @@ async fn test_memo_transfers(
|
|||
&[&ctx.payer, &alice],
|
||||
ctx.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let err: TransactionError = ctx
|
||||
let err = ctx
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
drop(ctx);
|
||||
assert_eq!(
|
||||
err,
|
||||
|
|
|
@ -181,14 +181,12 @@ async fn fail_init_after_close_account() {
|
|||
&[&context.payer, &owner],
|
||||
context.last_blockhash,
|
||||
);
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let error: TransactionError = context
|
||||
let error = context
|
||||
.banks_client
|
||||
.process_transaction(tx)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.unwrap()
|
||||
.into();
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
error,
|
||||
TransactionError::InstructionError(2, InstructionError::InvalidAccountData)
|
||||
|
|
Loading…
Reference in New Issue