Skip to content

Commit 994cbd9

Browse files
committed
clippy, fmt, test
1 parent 208365a commit 994cbd9

File tree

8 files changed

+15
-19
lines changed

8 files changed

+15
-19
lines changed

contracts/active-delta-neutral/src/contract.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
use cosmwasm_std::{
2-
entry_point, to_binary, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response,
3-
StdResult,
1+
use cosmwasm_std::{entry_point, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult};
2+
use mars_types::active_delta_neutral::{
3+
execute::ExecuteMsg, instantiate::InstantiateMsg, query::QueryMsg,
44
};
5-
use mars_types::active_delta_neutral::{execute::ExecuteMsg, instantiate::InstantiateMsg, query::QueryMsg};
65

7-
use crate::{error::ContractResult, execute, state::CONFIG};
6+
use crate::{error::ContractResult, execute};
87

98
/// Handles execution of contract messages for the delta-neutral strategy.
109
///
@@ -53,7 +52,7 @@ pub fn execute(
5352

5453
#[cfg_attr(not(feature = "library"), entry_point)]
5554
pub fn instantiate(
56-
deps: DepsMut,
55+
_deps: DepsMut,
5756
_env: Env,
5857
_info: MessageInfo,
5958
_msg: InstantiateMsg,
@@ -63,7 +62,7 @@ pub fn instantiate(
6362
}
6463

6564
#[cfg_attr(not(feature = "library"), entry_point)]
66-
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
65+
pub fn query(_deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
6766
match msg {
6867
QueryMsg::Config {} => unimplemented!(),
6968
}

contracts/active-delta-neutral/src/execute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use cosmwasm_std::{
44
};
55
use mars_delta_neutral_position::types::Position;
66
use mars_types::{
7-
active_delta_neutral::{query::Config, execute::ExecuteMsg},
7+
active_delta_neutral::{execute::ExecuteMsg, query::Config},
88
adapters::{credit_manager::CreditManager, params::Params},
99
credit_manager,
1010
credit_manager::{ActionAmount, ActionCoin},

contracts/active-delta-neutral/src/instantiate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ pub fn instantiate(
99
_info: MessageInfo,
1010
_msg: InstantiateMsg,
1111
) -> ContractResult<Response> {
12-
1312
Ok(Response::new())
14-
}
13+
}

contracts/credit-manager/tests/tests/test_liquidate_vault.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fn liquidatee_must_have_the_request_vault_position() {
7474
assert_err(
7575
res,
7676
ContractError::Std(NotFound {
77-
kind: "type: mars_types::adapters::vault::amount::VaultPositionAmount; key: [00, 0F, 76, 61, 75, 6C, 74, 5F, 70, 6F, 73, 69, 74, 69, 6F, 6E, 73, 00, 01, 32, 63, 6F, 6E, 74, 72, 61, 63, 74, 31, 34]".to_string(),
77+
kind: "type: mars_types::adapters::vault::amount::VaultPositionAmount; key: [00, 0F, 76, 61, 75, 6C, 74, 5F, 70, 6F, 73, 69, 74, 69, 6F, 6E, 73, 00, 01, 32, 63, 6F, 6E, 74, 72, 61, 63, 74, 31, 35]".to_string(),
7878
}),
7979
)
8080
}

packages/testing/src/multitest/helpers/mock_env.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ use mars_types::{
2525
ExecuteMsg as NftExecuteMsg, InstantiateMsg as NftInstantiateMsg, NftConfigUpdates,
2626
QueryMsg as NftQueryMsg, UncheckedNftConfig,
2727
},
28-
active_delta_neutral::{
29-
execute::ExecuteMsg as ActiveDeltaNeutralExecuteMsg,
30-
instantiate::InstantiateMsg as ActiveDeltaNeutralInstantiateMsg,
31-
},
28+
active_delta_neutral::instantiate::InstantiateMsg as ActiveDeltaNeutralInstantiateMsg,
3229
adapters::{
3330
account_nft::AccountNftUnchecked,
3431
active_delta_neutral::ActiveDeltaNeutral,

packages/types/src/active_delta_neutral/execute.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
use crate::swapper::SwapperRoute;
21
use cosmwasm_std::Uint128;
32
use schemars::JsonSchema;
43
use serde::{Deserialize, Serialize};
54

5+
use crate::swapper::SwapperRoute;
6+
67
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
78
pub enum ExecuteMsg {
89
Increase {
@@ -20,4 +21,4 @@ pub enum ExecuteMsg {
2021
denom: String,
2122
increasing: bool,
2223
},
23-
}
24+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pub mod query;
21
pub mod execute;
32
pub mod instantiate;
3+
pub mod query;

packages/types/src/active_delta_neutral/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ pub struct Config {
1818
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
1919
pub enum QueryMsg {
2020
Config {},
21-
}
21+
}

0 commit comments

Comments
 (0)