Skip to content

Commit

Permalink
Remove unnecessary cast
Browse files Browse the repository at this point in the history
A recent update to clippy introduced a new class of warning.

Clippy emits:

 warning: casting to the same type is unnecessary (`usize` -> `usize`)

As suggested remove the unnecessary cast.
  • Loading branch information
tcharding committed Dec 16, 2022
1 parent 48ce60d commit b3cd414
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ecdsa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Signature {
ffi::secp256k1_context_no_precomp,
&mut ret,
data.as_c_ptr(),
data.len() as usize,
data.len(),
) == 1
{
Ok(Signature(ret))
Expand Down Expand Up @@ -105,7 +105,7 @@ impl Signature {
ffi::secp256k1_context_no_precomp,
&mut ret,
data.as_c_ptr(),
data.len() as usize,
data.len(),
) == 1
{
Ok(Signature(ret))
Expand Down
2 changes: 1 addition & 1 deletion src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ impl PublicKey {
ffi::secp256k1_context_no_precomp,
&mut pk,
data.as_c_ptr(),
data.len() as usize,
data.len(),
) == 1
{
Ok(PublicKey(pk))
Expand Down

0 comments on commit b3cd414

Please sign in to comment.