Skip to content

Commit

Permalink
feat: fix clippy and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrobot committed Jan 16, 2025
1 parent ba8ffd6 commit e762eaf
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 11 deletions.
5 changes: 1 addition & 4 deletions contracts/injective-cosmwasm-mock/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ fn save_cache_info(deps: DepsMut<InjectiveQueryWrapper>, market_id: MarketId, su
market_id,
};

let mut order_cache = match ORDER_CALL_CACHE.may_load(deps.storage)? {
Some(order_cache) => order_cache,
None => vec![],
};
let mut order_cache = (ORDER_CALL_CACHE.may_load(deps.storage)?).unwrap_or_default();

order_cache.push(cache_order_info);

Expand Down
5 changes: 1 addition & 4 deletions contracts/injective-cosmwasm-stargate-example/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ fn save_cache_info(deps: DepsMut<InjectiveQueryWrapper>, market_id: MarketId, su
market_id,
};

let mut order_cache = match ORDER_CALL_CACHE.may_load(deps.storage)? {
Some(order_cache) => order_cache,
None => vec![],
};
let mut order_cache = (ORDER_CALL_CACHE.may_load(deps.storage)?).unwrap_or_default();

order_cache.push(cache_order_info);

Expand Down
1 change: 1 addition & 0 deletions packages/injective-cosmwasm/src/exchange_mock_querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ impl WasmMockQuerier {
Some(handler) => handler.handle(address.to_string(), denom.to_string()),
None => default_balance_bank_query_handler(denom),
},
#[allow(deprecated)]
BankQuery::AllBalances { address } => match &self.all_balances_query_handler {
Some(handler) => handler.handle(address.to_string()),
None => default_all_balances_bank_query_handler(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Params {
/// number of outstanding delegations which ended the associated period (and
/// might need to read that record)
/// + number of slashes which ended the associated period (and might need to
/// read that record)
/// read that record)
/// + one per validator for the zeroeth period, set on initialization
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use cw_multi_test::AddressGenerator;
use injective_cosmwasm::addr_to_bech32;
use secp256k1::{rand, PublicKey, Secp256k1, SecretKey};
use std::fmt::Write;
use std::u8;

const ADDRESS_LENGTH: usize = 40;
const ADDRESS_BYTES: usize = ADDRESS_LENGTH / 2;
Expand Down
1 change: 0 additions & 1 deletion packages/injective-testing/src/multi_test/chain_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::{
marker::PhantomData,
ops::Deref,
rc::Rc,
u8,
};

pub enum StargateT {
Expand Down

0 comments on commit e762eaf

Please sign in to comment.