Skip to content

Commit

Permalink
apply clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
epanchee committed Jun 4, 2024
1 parent caa4a92 commit 100c61d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions contracts/factory/tests/querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ pub struct MockedStargateQuerier<'a> {
pair_infos: HashMap<&'a str, PairInfo>,
}

impl<'a> Default for MockedStargateQuerier<'a> {
fn default() -> Self {
Self::new()
}
}

impl<'a> MockedStargateQuerier<'a> {
pub fn new() -> Self {
Self {
Expand Down
2 changes: 1 addition & 1 deletion contracts/maker/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn query_out_amount(
for step in steps {
let step_price = query_spot_price(querier, step.pool_id, &denom_in, &step.token_out_denom)?;
price = price.checked_mul(step_price)?;
denom_in = step.token_out_denom.clone();
denom_in.clone_from(&step.token_out_denom);
}

let out_amount = coin_in
Expand Down
2 changes: 1 addition & 1 deletion contracts/maker/tests/common/osmosis_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ impl Stargate for OsmosisStargate {
let contract_address = self.cw_pools.borrow()[&inner.pool_id].clone();
let querier = QuerierWrapper::<Empty>::new(querier);
let spot_price: SpotPriceResponse = querier.query_wasm_smart(
&contract_address,
contract_address,
&QueryMsg::SpotPrice {
quote_asset_denom: inner.quote_asset_denom.to_string(),
base_asset_denom: inner.quote_asset_denom.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl<'a> TestAppWrapper<'a> {
&[],
)
.unwrap();
helper.coin_registry = coin_registry_address.clone();
helper.coin_registry.clone_from(&coin_registry_address);

helper.astro_denom = helper.register_and_mint("astro", 1_000_000_000_000, 6, None);

Expand Down

0 comments on commit 100c61d

Please sign in to comment.