Skip to content

Commit

Permalink
chore: please clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kerber0x committed Apr 17, 2024
1 parent cdc54e7 commit 63e47c7
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions contracts/alliance-hub/src/tests/instantiate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ use cosmwasm_std::{
use terra_proto_rs::traits::MessageExt;

use alliance_protocol::alliance_protocol::ExecuteMsg::UpdateConfig;
use alliance_protocol::alliance_protocol::{Config, ExecuteMsg, QueryMsg};
use alliance_protocol::alliance_protocol::{Config, QueryMsg};

use crate::contract::{execute, reply};
use crate::query::query;
use crate::tests::helpers::{asset_distribution_1, setup_contract};
use crate::tests::helpers::setup_contract;
use crate::token_factory::{CustomExecuteMsg, DenomUnit, Metadata, TokenExecuteMsg};

#[test]
Expand Down Expand Up @@ -153,9 +153,8 @@ fn test_update_config() {
msg.clone(),
);

match result {
Ok(_) => panic!("should be unauthorized"),
Err(_) => {}
if let Ok(_) = result {
panic!("should be unauthorized")
}

let result = execute(
Expand All @@ -165,9 +164,8 @@ fn test_update_config() {
msg.clone(),
);

match result {
Ok(_) => panic!("should be unauthorized"),
Err(_) => {}
if let Ok(_) = result {
panic!("should be unauthorized")
}

let result = execute(
Expand All @@ -177,16 +175,14 @@ fn test_update_config() {
msg.clone(),
);

match result {
Ok(_) => panic!("should be unauthorized"),
Err(_) => {}
if let Ok(_) = result {
panic!("should be unauthorized")
}

let result = execute(deps.as_mut(), mock_env(), mock_info("gov", &[]), msg);

match result {
Ok(_) => {}
Err(_) => panic!("should be fine"),
if let Err(_) = result {
panic!("should be fine")
}

let query_config = query(deps.as_ref(), mock_env(), QueryMsg::Config {}).unwrap();
Expand Down

0 comments on commit 63e47c7

Please sign in to comment.