Skip to content

Commit

Permalink
fixed clippy warning
Browse files Browse the repository at this point in the history
Signed-off-by: wthrajat <rajatkhanduri290102@gmail.com>
  • Loading branch information
wthrajat authored and rajarshimaitra committed Dec 21, 2023
1 parent 1cc0837 commit 7573e73
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/protocol/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,7 @@ pub fn read_hashvalue_from_contract(redeemscript: &Script) -> Result<Hash160, Co
return Err(ContractError::Protocol("Invalid script!"));

Check warning on line 289 in src/protocol/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/protocol/contract.rs#L289

Added line #L289 was not covered by tests
};

Ok(Hash160::from_slice(hash_b.as_bytes().try_into().map_err(
|_| ContractError::Protocol("hash value is not 20 bytes slice"),
)?)?)
Ok(Hash160::from_slice(hash_b.as_bytes())?)
}

/// Check that all the contract redeemscripts involve the same hashvalue.
Expand Down

0 comments on commit 7573e73

Please sign in to comment.