Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
--global committed Jan 17, 2024
1 parent fc86e04 commit 5e439b2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contracts/pool/src/tests/config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extern crate std;
use soroban_sdk::{testutils::Address as _, Address, Env, String};
use soroban_sdk::{testutils::Address as _, Address, Env};

use super::setup::{deploy_liquidity_pool_contract, deploy_token_contract};
use crate::storage::{Config, PairType};
Expand Down
2 changes: 1 addition & 1 deletion contracts/pool/src/tests/liquidity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use pretty_assertions::assert_eq;
use soroban_sdk::{
symbol_short,
testutils::{Address as _, AuthorizedFunction, AuthorizedInvocation},
Address, Env, IntoVal, String, Symbol,
Address, Env, IntoVal, Symbol,
};

use super::setup::{deploy_liquidity_pool_contract, deploy_token_contract};
Expand Down
4 changes: 2 additions & 2 deletions contracts/pool/src/tests/setup.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use soroban_sdk::{testutils::Address as _, Address, BytesN, Env, String};
use soroban_sdk::{testutils::Address as _, Address, BytesN, Env};

use crate::{
contract::{LiquidityPool, LiquidityPoolClient},
Expand Down Expand Up @@ -41,7 +41,7 @@ pub fn deploy_liquidity_pool_contract<'a>(
let stake_wasm_hash = install_stake_wasm(env);
let fee_recipient = fee_recipient
.into()
.unwrap_or_else(|| Address::generate(&env));
.unwrap_or_else(|| Address::generate(env));
let max_allowed_slippage = max_allowed_slippage_bps.into().unwrap_or(5_000); // 50% if not specified
let max_allowed_spread = max_allowed_spread_bps.into().unwrap_or(500); // 5% if not specified
let share_token_decimals = 7u32;
Expand Down
4 changes: 2 additions & 2 deletions contracts/pool/src/tests/stake_deployment.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate std;
use phoenix::utils::{StakeInitInfo, TokenInitInfo};
use soroban_sdk::{testutils::Address as _, Address, Env, String};
use soroban_sdk::{testutils::Address as _, Address, Env};

use super::setup::{deploy_liquidity_pool_contract, deploy_token_contract};
use crate::{
Expand Down Expand Up @@ -80,7 +80,7 @@ fn second_pool_deployment_should_fail() {

let mut admin1 = Address::generate(&env);
let mut admin2 = Address::generate(&env);
let mut user = Address::generate(&env);
let user = Address::generate(&env);

let mut token1 = deploy_token_contract(&env, &admin1);
let mut token2 = deploy_token_contract(&env, &admin2);
Expand Down
2 changes: 1 addition & 1 deletion contracts/pool/src/tests/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use pretty_assertions::assert_eq;
use soroban_sdk::{
symbol_short,
testutils::{Address as _, AuthorizedFunction, AuthorizedInvocation},
Address, Env, IntoVal, String,
Address, Env, IntoVal,
};
use test_case::test_case;

Expand Down
1 change: 1 addition & 0 deletions contracts/token/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub struct Token;

#[contractimpl]
impl Token {
#[allow(dead_code)]
pub fn initialize(e: Env, admin: Address, decimal: u32, name: String, symbol: String) {
#[allow(dead_code)]
if has_administrator(&e) {
Expand Down
1 change: 1 addition & 0 deletions contracts/token/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub fn read_symbol(e: &Env) -> String {
util.metadata().get_metadata().symbol
}

#[allow(dead_code)]
pub fn write_metadata(e: &Env, metadata: TokenMetadata) {
let util = TokenUtils::new(e);
util.metadata().set_metadata(&metadata);
Expand Down

0 comments on commit 5e439b2

Please sign in to comment.