From 7873faf46b8446ea366d7fdc9e4e9fa54d38e6f0 Mon Sep 17 00:00:00 2001 From: Kaloyan Gangov Date: Tue, 13 Aug 2024 22:54:53 +0300 Subject: [PATCH] lints and refactors --- contracts/collections/src/contract.rs | 2 +- contracts/collections/src/lib.rs | 2 +- contracts/collections/src/storage.rs | 1 + contracts/collections/src/{tests.rs => test.rs} | 0 contracts/collections/src/{tests => test}/setup.rs | 0 contracts/collections/src/{tests => test}/tests.rs | 2 +- 6 files changed, 4 insertions(+), 3 deletions(-) rename contracts/collections/src/{tests.rs => test.rs} (100%) rename contracts/collections/src/{tests => test}/setup.rs (100%) rename contracts/collections/src/{tests => test}/tests.rs (98%) diff --git a/contracts/collections/src/contract.rs b/contracts/collections/src/contract.rs index 7a773b79..60ea1e1e 100644 --- a/contracts/collections/src/contract.rs +++ b/contracts/collections/src/contract.rs @@ -1,4 +1,4 @@ -use soroban_sdk::{contract, contractimpl, log, testutils, vec, Address, Bytes, Env, String, Vec}; +use soroban_sdk::{contract, contractimpl, log, vec, Address, Bytes, Env, String, Vec}; use crate::{ error::ContractError, diff --git a/contracts/collections/src/lib.rs b/contracts/collections/src/lib.rs index f343e21e..6cb73305 100644 --- a/contracts/collections/src/lib.rs +++ b/contracts/collections/src/lib.rs @@ -5,4 +5,4 @@ mod error; mod storage; #[cfg(test)] -mod tests; +mod test; diff --git a/contracts/collections/src/storage.rs b/contracts/collections/src/storage.rs index 7e089b21..3fb03351 100644 --- a/contracts/collections/src/storage.rs +++ b/contracts/collections/src/storage.rs @@ -94,6 +94,7 @@ pub mod utils { Ok(()) } + #[allow(dead_code)] pub fn get_config(env: &Env) -> Result { if let Some(config) = env.storage().persistent().get(&DataKey::Config) { Ok(config) diff --git a/contracts/collections/src/tests.rs b/contracts/collections/src/test.rs similarity index 100% rename from contracts/collections/src/tests.rs rename to contracts/collections/src/test.rs diff --git a/contracts/collections/src/tests/setup.rs b/contracts/collections/src/test/setup.rs similarity index 100% rename from contracts/collections/src/tests/setup.rs rename to contracts/collections/src/test/setup.rs diff --git a/contracts/collections/src/tests/tests.rs b/contracts/collections/src/test/tests.rs similarity index 98% rename from contracts/collections/src/tests/tests.rs rename to contracts/collections/src/test/tests.rs index 879c7d9c..1be659af 100644 --- a/contracts/collections/src/tests/tests.rs +++ b/contracts/collections/src/test/tests.rs @@ -17,7 +17,7 @@ fn proper_initialization() { let name = &String::from_str(&env, "Stellar kitties"); let collections_client = - initialize_collection_contract(&env, Some(&admin), Some(&name), Some(&uri_value)); + initialize_collection_contract(&env, Some(&admin), Some(name), Some(&uri_value)); let actual_admin_addr = collections_client.show_admin(); assert_eq!(admin, actual_admin_addr);