Skip to content

Commit

Permalink
Clippy. : )
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Sep 15, 2023
1 parent d936210 commit d64fbeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contracts/voting/dao-voting-cw721-staked/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub fn instantiate(
},
FACTORY_EXECUTE_REPLY_ID,
))),
_ => return Err(ContractError::UnsupportedFactoryMsg {}),
_ => Err(ContractError::UnsupportedFactoryMsg {}),
},
}
}
Expand Down Expand Up @@ -756,7 +756,7 @@ pub fn reply(deps: DepsMut, _env: Env, msg: Reply) -> Result<Response, ContractE
Ok(Response::new().add_attribute("nft_contract", info.nft_contract))
}
// TODO better error
None => return Err(ContractError::Unauthorized {}),
None => Err(ContractError::Unauthorized {}),
}
}
_ => Err(ContractError::UnknownReplyId { id: msg.id }),
Expand Down
6 changes: 3 additions & 3 deletions contracts/voting/dao-voting-token-staked/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn instantiate(
},
FACTORY_EXECUTE_REPLY_ID,
))),
_ => return Err(ContractError::UnsupportedFactoryMsg {}),
_ => Err(ContractError::UnsupportedFactoryMsg {}),
},
}
}
Expand Down Expand Up @@ -732,7 +732,7 @@ pub fn reply(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, ContractEr
// Save token issuer contract if one is returned
if let Some(ref token_contract) = info.token_contract {
TOKEN_ISSUER_CONTRACT
.save(deps.storage, &deps.api.addr_validate(&token_contract)?)?;
.save(deps.storage, &deps.api.addr_validate(token_contract)?)?;
}

// TODO validate active threshold is set? Some contracts such as a minter,
Expand All @@ -743,7 +743,7 @@ pub fn reply(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, ContractEr
.add_attribute("token_contract", info.token_contract.unwrap_or_default()))
}
// TODO better error
None => return Err(ContractError::Unauthorized {}),
None => Err(ContractError::Unauthorized {}),
}
}
_ => Err(ContractError::UnknownReplyId { id: msg.id }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ fn test_factory() {
};

// Instantiate DAO
let dao = DaoCore::new(&app, &msg, &accounts[0]).unwrap();
let _dao = DaoCore::new(&app, &msg, &accounts[0]).unwrap();

// TODO query voting module

Expand Down

0 comments on commit d64fbeb

Please sign in to comment.