From b058f1e788dc9c5dd82cd7af680659785dfd9304 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Tue, 12 Nov 2024 13:22:01 -0500 Subject: [PATCH] fix clippy again --- .../soroban-test/tests/fixtures/test-wasms/token/src/test.rs | 4 ++-- cmd/soroban-cli/src/utils/contract-template/src/test.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs index 08be5f9ef..cd892a646 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs @@ -9,7 +9,7 @@ use soroban_sdk::{ }; fn create_token<'a>(e: &Env, admin: &Address) -> TokenClient<'a> { - let token = TokenClient::new(e, &e.register_contract(None, Token {})); + let token = TokenClient::new(e, &e.register(Token {}, ())); token.initialize(admin, &7, &"name".into_val(e), &"symbol".into_val(e)); token } @@ -247,7 +247,7 @@ fn initialize_already_initialized() { fn decimal_is_over_max() { let e = Env::default(); let admin = Address::generate(&e); - let token = TokenClient::new(&e, &e.register_contract(None, Token {})); + let token = TokenClient::new(&e, &e.register(Token {}, ())); token.initialize( &admin, &(u32::from(u8::MAX) + 1), diff --git a/cmd/soroban-cli/src/utils/contract-template/src/test.rs b/cmd/soroban-cli/src/utils/contract-template/src/test.rs index af69a7ecb..0bdcba082 100644 --- a/cmd/soroban-cli/src/utils/contract-template/src/test.rs +++ b/cmd/soroban-cli/src/utils/contract-template/src/test.rs @@ -6,7 +6,7 @@ use soroban_sdk::{vec, Env, String}; #[test] fn test() { let env = Env::default(); - let contract_id = env.register_contract(None, Contract); + let contract_id = env.register(Contract, ()); let client = ContractClient::new(&env, &contract_id); let words = client.hello(&String::from_str(&env, "Dev"));