From c0a3bee924a099f4523e436dbf7c7a6e9c6c541e Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Wed, 8 Apr 2026 15:01:22 +1000 Subject: [PATCH] clippy --- integration_tests/tests/amm.rs | 8 +++--- integration_tests/tests/ata.rs | 48 +++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/integration_tests/tests/amm.rs b/integration_tests/tests/amm.rs index 94ff70eb..dde9e7f5 100644 --- a/integration_tests/tests/amm.rs +++ b/integration_tests/tests/amm.rs @@ -117,7 +117,7 @@ async fn amm_public() -> Result<()> { definition_account_label: None, supply_account_id: Some(format_public_account_id(supply_account_id_1)), supply_account_label: None, - name: "A NAM1".to_string(), + name: "A NAM1".to_owned(), total_supply: 37, }; @@ -146,7 +146,7 @@ async fn amm_public() -> Result<()> { definition_account_label: None, supply_account_id: Some(format_public_account_id(supply_account_id_2)), supply_account_label: None, - name: "A NAM2".to_string(), + name: "A NAM2".to_owned(), total_supply: 37, }; @@ -537,7 +537,7 @@ async fn amm_new_pool_using_labels() -> Result<()> { definition_account_label: None, supply_account_id: Some(format_public_account_id(supply_account_id_1)), supply_account_label: None, - name: "TOKEN1".to_string(), + name: "TOKEN1".to_owned(), total_supply: 10, }; wallet::cli::execute_subcommand(ctx.wallet_mut(), Command::Token(subcommand)).await?; @@ -561,7 +561,7 @@ async fn amm_new_pool_using_labels() -> Result<()> { definition_account_label: None, supply_account_id: Some(format_public_account_id(supply_account_id_2)), supply_account_label: None, - name: "TOKEN2".to_string(), + name: "TOKEN2".to_owned(), total_supply: 10, }; wallet::cli::execute_subcommand(ctx.wallet_mut(), Command::Token(subcommand)).await?; diff --git a/integration_tests/tests/ata.rs b/integration_tests/tests/ata.rs index 94ba98c9..c0918635 100644 --- a/integration_tests/tests/ata.rs +++ b/integration_tests/tests/ata.rs @@ -68,8 +68,10 @@ async fn create_ata_initializes_holding_account() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::New { - definition_account_id: format_public_account_id(definition_account_id), - supply_account_id: format_public_account_id(supply_account_id), + definition_account_id: Some(format_public_account_id(definition_account_id)), + definition_account_label: None, + supply_account_id: Some(format_public_account_id(supply_account_id)), + supply_account_label: None, name: "TEST".to_owned(), total_supply, }), @@ -130,8 +132,10 @@ async fn create_ata_is_idempotent() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::New { - definition_account_id: format_public_account_id(definition_account_id), - supply_account_id: format_public_account_id(supply_account_id), + definition_account_id: Some(format_public_account_id(definition_account_id)), + definition_account_label: None, + supply_account_id: Some(format_public_account_id(supply_account_id)), + supply_account_label: None, name: "TEST".to_owned(), total_supply: 100, }), @@ -208,8 +212,10 @@ async fn transfer_and_burn_via_ata() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::New { - definition_account_id: format_public_account_id(definition_account_id), - supply_account_id: format_public_account_id(supply_account_id), + definition_account_id: Some(format_public_account_id(definition_account_id)), + definition_account_label: None, + supply_account_id: Some(format_public_account_id(supply_account_id)), + supply_account_label: None, name: "TEST".to_owned(), total_supply, }), @@ -256,8 +262,10 @@ async fn transfer_and_burn_via_ata() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::Send { - from: format_public_account_id(supply_account_id), + from: Some(format_public_account_id(supply_account_id)), + from_label: None, to: Some(format_public_account_id(sender_ata_id)), + to_label: None, to_npk: None, to_vpk: None, amount: fund_amount, @@ -362,8 +370,10 @@ async fn create_ata_with_private_owner() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::New { - definition_account_id: format_public_account_id(definition_account_id), - supply_account_id: format_public_account_id(supply_account_id), + definition_account_id: Some(format_public_account_id(definition_account_id)), + definition_account_label: None, + supply_account_id: Some(format_public_account_id(supply_account_id)), + supply_account_label: None, name: "TEST".to_owned(), total_supply: 100, }), @@ -434,8 +444,10 @@ async fn transfer_via_ata_private_owner() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::New { - definition_account_id: format_public_account_id(definition_account_id), - supply_account_id: format_public_account_id(supply_account_id), + definition_account_id: Some(format_public_account_id(definition_account_id)), + definition_account_label: None, + supply_account_id: Some(format_public_account_id(supply_account_id)), + supply_account_label: None, name: "TEST".to_owned(), total_supply, }), @@ -482,8 +494,10 @@ async fn transfer_via_ata_private_owner() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::Send { - from: format_public_account_id(supply_account_id), + from: Some(format_public_account_id(supply_account_id)), + from_label: None, to: Some(format_public_account_id(sender_ata_id)), + to_label: None, to_npk: None, to_vpk: None, amount: fund_amount, @@ -556,8 +570,10 @@ async fn burn_via_ata_private_owner() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::New { - definition_account_id: format_public_account_id(definition_account_id), - supply_account_id: format_public_account_id(supply_account_id), + definition_account_id: Some(format_public_account_id(definition_account_id)), + definition_account_label: None, + supply_account_id: Some(format_public_account_id(supply_account_id)), + supply_account_label: None, name: "TEST".to_owned(), total_supply, }), @@ -592,8 +608,10 @@ async fn burn_via_ata_private_owner() -> Result<()> { wallet::cli::execute_subcommand( ctx.wallet_mut(), Command::Token(TokenProgramAgnosticSubcommand::Send { - from: format_public_account_id(supply_account_id), + from: Some(format_public_account_id(supply_account_id)), + from_label: None, to: Some(format_public_account_id(holder_ata_id)), + to_label: None, to_npk: None, to_vpk: None, amount: fund_amount,