Skip to content

Commit fb932f6

Browse files
committed
Actually return the error
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.
1 parent 148112c commit fb932f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/descriptor/sortedmulti.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> SortedMultiVec<Pk, Ctx> {
4646
pub fn new(k: usize, pks: Vec<Pk>) -> Result<Self, Error> {
4747
// A sortedmulti() is only defined for <= 20 keys (it maps to CHECKMULTISIG)
4848
if pks.len() > MAX_PUBKEYS_PER_MULTISIG {
49-
Error::BadDescriptor("Too many public keys".to_string());
49+
return Err(Error::BadDescriptor("Too many public keys".to_string()));
5050
}
5151

5252
// Check the limits before creating a new SortedMultiVec

0 commit comments

Comments
 (0)