@@ -83,8 +83,10 @@ impl<Pk: MiniscriptKey> Liftable<Pk> for Wsh<Pk> {
8383 }
8484}
8585
86- impl < Pk : MiniscriptKey > FromTree for Wsh < Pk >
86+ impl < Pk > FromTree for Wsh < Pk >
8787where
88+ Pk : MiniscriptKey + FromStr ,
89+ Pk :: Hash : FromStr ,
8890 <Pk as FromStr >:: Err : ToString ,
8991 <<Pk as MiniscriptKey >:: Hash as FromStr >:: Err : ToString ,
9092{
@@ -130,8 +132,10 @@ impl<Pk: MiniscriptKey> fmt::Display for Wsh<Pk> {
130132 }
131133}
132134
133- impl < Pk : MiniscriptKey > FromStr for Wsh < Pk >
135+ impl < Pk > FromStr for Wsh < Pk >
134136where
137+ Pk : MiniscriptKey + FromStr ,
138+ Pk :: Hash : FromStr ,
135139 <Pk as FromStr >:: Err : ToString ,
136140 <<Pk as MiniscriptKey >:: Hash as FromStr >:: Err : ToString ,
137141{
@@ -144,11 +148,7 @@ where
144148 }
145149}
146150
147- impl < Pk : MiniscriptKey > DescriptorTrait < Pk > for Wsh < Pk >
148- where
149- <Pk as FromStr >:: Err : ToString ,
150- <<Pk as MiniscriptKey >:: Hash as FromStr >:: Err : ToString ,
151- {
151+ impl < Pk : MiniscriptKey > DescriptorTrait < Pk > for Wsh < Pk > {
152152 fn sanity_check ( & self ) -> Result < ( ) , Error > {
153153 match self . inner {
154154 WshInner :: SortedMulti ( ref smv) => smv. sanity_check ( ) ?,
@@ -315,8 +315,10 @@ impl<Pk: MiniscriptKey> Liftable<Pk> for Wpkh<Pk> {
315315 }
316316}
317317
318- impl < Pk : MiniscriptKey > FromTree for Wpkh < Pk >
318+ impl < Pk > FromTree for Wpkh < Pk >
319319where
320+ Pk : MiniscriptKey + FromStr ,
321+ Pk :: Hash : FromStr ,
320322 <Pk as FromStr >:: Err : ToString ,
321323 <<Pk as MiniscriptKey >:: Hash as FromStr >:: Err : ToString ,
322324{
@@ -335,8 +337,10 @@ where
335337 }
336338}
337339
338- impl < Pk : MiniscriptKey > FromStr for Wpkh < Pk >
340+ impl < Pk > FromStr for Wpkh < Pk >
339341where
342+ Pk : MiniscriptKey + FromStr ,
343+ Pk :: Hash : FromStr ,
340344 <Pk as FromStr >:: Err : ToString ,
341345 <<Pk as MiniscriptKey >:: Hash as FromStr >:: Err : ToString ,
342346{
@@ -349,11 +353,7 @@ where
349353 }
350354}
351355
352- impl < Pk : MiniscriptKey > DescriptorTrait < Pk > for Wpkh < Pk >
353- where
354- <Pk as FromStr >:: Err : ToString ,
355- <<Pk as MiniscriptKey >:: Hash as FromStr >:: Err : ToString ,
356- {
356+ impl < Pk : MiniscriptKey > DescriptorTrait < Pk > for Wpkh < Pk > {
357357 fn sanity_check ( & self ) -> Result < ( ) , Error > {
358358 if self . pk . is_uncompressed ( ) {
359359 Err ( Error :: ContextError ( ScriptContextError :: CompressedOnly ) )
0 commit comments