Skip to content

Commit

Permalink
Actually return the error
Browse files Browse the repository at this point in the history
We have what appears to be an error return but do not actually return
the error. This line needs an explicit `return` statement otherwise it
is a noop.
  • Loading branch information
tcharding committed Apr 22, 2022
1 parent 148112c commit eb42276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/descriptor/sortedmulti.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> SortedMultiVec<Pk, Ctx> {
pub fn new(k: usize, pks: Vec<Pk>) -> Result<Self, Error> {
// A sortedmulti() is only defined for <= 20 keys (it maps to CHECKMULTISIG)
if pks.len() > MAX_PUBKEYS_PER_MULTISIG {
Error::BadDescriptor("Too many public keys".to_string());
return Err(Error::BadDescriptor("Too many public keys".to_string()));
}

// Check the limits before creating a new SortedMultiVec
Expand Down

0 comments on commit eb42276

Please sign in to comment.