Skip to content

Commit

Permalink
cosmwasm: fix clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
a5-pickle authored and justinschuldt committed Jan 27, 2023
1 parent 58e6afd commit 1b40fdb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cosmwasm/contracts/cw20-wrapped/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn instantiate(

if let Some(mint_info) = msg.mint {
execute_mint(deps, env, info, mint_info.recipient, mint_info.amount)
.map_err(|e| StdError::generic_err(format!("{}", e)))?;
.map_err(|e| StdError::generic_err(format!("{e}")))?;
}

if let Some(hook) = msg.init_hook {
Expand Down
12 changes: 5 additions & 7 deletions cosmwasm/contracts/token-bridge/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ fn handle_register_asset(

Ok(Response::new()
.add_attribute("action", "register_asset")
.add_attribute("token_chain", format!("{:?}", chain))
.add_attribute("token_address", format!("{:?}", token_address))
.add_attribute("token_chain", format!("{chain:?}"))
.add_attribute("token_address", format!("{token_address:?}"))
.add_attribute("contract_addr", info.sender))
}

Expand Down Expand Up @@ -424,13 +424,11 @@ fn handle_attest_meta(

let token_address: [u8; 32] = match token_id {
TokenId::Bank { denom } => Err(StdError::generic_err(format!(
"{} is native to this chain and should not be attested",
denom
"{denom} is native to this chain and should not be attested"
))),
TokenId::Contract(ContractId::NativeCW20 { contract_address }) => {
Err(StdError::generic_err(format!(
"Contract {} is native to this chain and should not be attested",
contract_address
"Contract {contract_address} is native to this chain and should not be attested"
)))
}
TokenId::Contract(ContractId::ForeignToken {
Expand Down Expand Up @@ -1518,7 +1516,7 @@ fn query_transfer_info(deps: Deps, env: Env, vaa: &Binary) -> StdResult<Transfer
payload: info.payload,
})
}
other => Err(StdError::generic_err(format!("Invalid action: {}", other))),
other => Err(StdError::generic_err(format!("Invalid action: {other}"))),
}
}

Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/contracts/token-bridge/src/token_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl ExternalTokenId {
contract_address: human_address,
}))
}
b => Err(StdError::generic_err(format!("Unknown marker byte: {}", b))),
b => Err(StdError::generic_err(format!("Unknown marker byte: {b}"))),
}
} else {
Ok(TokenId::Contract(ContractId::ForeignToken {
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/contracts/wormhole/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub enum ContractError {
impl ContractError {
pub fn std(&self) -> StdError {
StdError::GenericErr {
msg: format!("{}", self),
msg: format!("{self}"),
}
}

Expand Down

0 comments on commit 1b40fdb

Please sign in to comment.