Skip to content

Commit

Permalink
fix: unnecessary clone and strng lenght comparition removed
Browse files Browse the repository at this point in the history
  • Loading branch information
gcranju committed Sep 8, 2023
1 parent 390550b commit 4fa6628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/token-contracts/cw-hub-bnusd/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ mod execute {
match method {
X_CROSS_TRANSFER => {
let cross_transfer_data: CrossTransfer = decode(&data).unwrap();
x_cross_transfer(deps, env, info, from.clone(), cross_transfer_data)?;
x_cross_transfer(deps, env, info, from, cross_transfer_data)?;
}
X_CROSS_TRANSFER_REVERT => {
let cross_transfer_revert_data: CrossTransferRevert = decode(&data).unwrap();
Expand Down Expand Up @@ -443,7 +443,7 @@ fn setup_function(
let x_call_network_address: NetworkAddress =
deps.querier.query(&query).map_err(ContractError::Std)?;

if x_call_network_address.to_string().len() == 0 {
if x_call_network_address.to_string().is_empty(){
return Err(ContractError::AddressNotFound);

Check warning on line 447 in contracts/token-contracts/cw-hub-bnusd/src/contract.rs

View check run for this annotation

Codecov / codecov/patch

contracts/token-contracts/cw-hub-bnusd/src/contract.rs#L447

Added line #L447 was not covered by tests
}
let nid = x_call_network_address.nid();
Expand Down

0 comments on commit 4fa6628

Please sign in to comment.