Remove unneeded return statement
Clippy emits: warning: unneeded `return` statement As suggested, remove the unneeded return statement.
This commit is contained in:
parent
16cac3cd70
commit
4b28a1bb97
|
@ -228,7 +228,7 @@ impl FromStr for PublicKey {
|
||||||
match s.len() {
|
match s.len() {
|
||||||
66 => PublicKey::from_slice(&<[u8; 33]>::from_hex(s)?),
|
66 => PublicKey::from_slice(&<[u8; 33]>::from_hex(s)?),
|
||||||
130 => PublicKey::from_slice(&<[u8; 65]>::from_hex(s)?),
|
130 => PublicKey::from_slice(&<[u8; 65]>::from_hex(s)?),
|
||||||
len => return Err(Error::Hex(hex::Error::InvalidLength(66, len)))
|
len => Err(Error::Hex(hex::Error::InvalidLength(66, len))),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ impl SchnorrSig {
|
||||||
// default type
|
// default type
|
||||||
let sig = secp256k1::schnorr::Signature::from_slice(sl)
|
let sig = secp256k1::schnorr::Signature::from_slice(sl)
|
||||||
.map_err(SchnorrSigError::Secp256k1)?;
|
.map_err(SchnorrSigError::Secp256k1)?;
|
||||||
return Ok( SchnorrSig { sig, hash_ty : SchnorrSighashType::Default });
|
Ok(SchnorrSig { sig, hash_ty: SchnorrSighashType::Default })
|
||||||
},
|
},
|
||||||
65 => {
|
65 => {
|
||||||
let (hash_ty, sig) = sl.split_last().expect("Slice len checked == 65");
|
let (hash_ty, sig) = sl.split_last().expect("Slice len checked == 65");
|
||||||
|
|
Loading…
Reference in New Issue