@@ -184,17 +184,13 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Clone for Terminal<Pk, Ctx> {
184184 Self :: DupIf ( ref sub) => Self :: DupIf ( Arc :: new ( Miniscript :: clone ( sub) ) ) ,
185185 Self :: Verify ( ref sub) => Self :: Verify ( Arc :: new ( Miniscript :: clone ( sub) ) ) ,
186186 Self :: NonZero ( ref sub) => Self :: NonZero ( Arc :: new ( Miniscript :: clone ( sub) ) ) ,
187- Self :: ZeroNotEqual ( ref sub) => {
188- Self :: ZeroNotEqual ( Arc :: new ( Miniscript :: clone ( sub) ) )
187+ Self :: ZeroNotEqual ( ref sub) => Self :: ZeroNotEqual ( Arc :: new ( Miniscript :: clone ( sub) ) ) ,
188+ Self :: AndV ( ref left, ref right) => {
189+ Self :: AndV ( Arc :: new ( Miniscript :: clone ( left) ) , Arc :: new ( Miniscript :: clone ( right) ) )
190+ }
191+ Self :: AndB ( ref left, ref right) => {
192+ Self :: AndB ( Arc :: new ( Miniscript :: clone ( left) ) , Arc :: new ( Miniscript :: clone ( right) ) )
189193 }
190- Self :: AndV ( ref left, ref right) => Self :: AndV (
191- Arc :: new ( Miniscript :: clone ( left) ) ,
192- Arc :: new ( Miniscript :: clone ( right) ) ,
193- ) ,
194- Self :: AndB ( ref left, ref right) => Self :: AndB (
195- Arc :: new ( Miniscript :: clone ( left) ) ,
196- Arc :: new ( Miniscript :: clone ( right) ) ,
197- ) ,
198194 Self :: AndOr ( ref a, ref b, ref c) => Self :: AndOr (
199195 Arc :: new ( Miniscript :: clone ( a) ) ,
200196 Arc :: new ( Miniscript :: clone ( b) ) ,
@@ -237,13 +233,9 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> PartialEq for Terminal<Pk, Ctx> {
237233 ( Self :: Ripemd160 ( h1) , Self :: Ripemd160 ( h2) ) if h1 != h2 => return false ,
238234 ( Self :: Hash160 ( h1) , Self :: Hash160 ( h2) ) if h1 != h2 => return false ,
239235 ( Self :: Multi ( th1) , Self :: Multi ( th2) ) if th1 != th2 => return false ,
240- ( Self :: SortedMulti ( th1) , Self :: SortedMulti ( th2) ) if th1 != th2 => {
241- return false
242- }
236+ ( Self :: SortedMulti ( th1) , Self :: SortedMulti ( th2) ) if th1 != th2 => return false ,
243237 ( Self :: MultiA ( th1) , Self :: MultiA ( th2) ) if th1 != th2 => return false ,
244- ( Self :: SortedMultiA ( th1) , Self :: SortedMultiA ( th2) ) if th1 != th2 => {
245- return false
246- }
238+ ( Self :: SortedMultiA ( th1) , Self :: SortedMultiA ( th2) ) if th1 != th2 => return false ,
247239 _ => {
248240 if mem:: discriminant ( me) != mem:: discriminant ( you) {
249241 return false ;
0 commit comments