@@ -43,8 +43,7 @@ use self::lex::{lex, TokenIter};
4343pub use crate :: miniscript:: context:: ScriptContext ;
4444use crate :: miniscript:: decode:: Terminal ;
4545use crate :: {
46- expression, plan, Error , ForEachKey , FromStrKey , MiniscriptKey , ToPublicKey , TranslatePk ,
47- Translator ,
46+ expression, plan, Error , ForEachKey , FromStrKey , MiniscriptKey , ToPublicKey , Translator ,
4847} ;
4948#[ cfg( test) ]
5049mod ms_tests;
@@ -514,25 +513,17 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> ForEachKey<Pk> for Miniscript<Pk, Ct
514513 }
515514}
516515
517- impl < Pk , Q , Ctx > TranslatePk < Pk , Q > for Miniscript < Pk , Ctx >
518- where
519- Pk : MiniscriptKey ,
520- Q : MiniscriptKey ,
521- Ctx : ScriptContext ,
522- {
523- type Output = Miniscript < Q , Ctx > ;
524-
516+ impl < Pk : MiniscriptKey , Ctx : ScriptContext > Miniscript < Pk , Ctx > {
525517 /// Translates a struct from one generic to another where the translation
526518 /// for Pk is provided by [`Translator`]
527- fn translate_pk < T , E > ( & self , t : & mut T ) -> Result < Self :: Output , TranslateErr < E > >
519+ pub fn translate_pk < Q , T , E > ( & self , t : & mut T ) -> Result < Miniscript < Q , Ctx > , TranslateErr < E > >
528520 where
529521 T : Translator < Pk , Q , E > ,
522+ Q : MiniscriptKey ,
530523 {
531524 self . translate_pk_ctx ( t)
532525 }
533- }
534526
535- impl < Pk : MiniscriptKey , Ctx : ScriptContext > Miniscript < Pk , Ctx > {
536527 pub ( super ) fn translate_pk_ctx < Q , CtxQ , T , FuncError > (
537528 & self ,
538529 t : & mut T ,
@@ -837,7 +828,7 @@ mod tests {
837828 use crate :: policy:: Liftable ;
838829 use crate :: prelude:: * ;
839830 use crate :: test_utils:: { StrKeyTranslator , StrXOnlyKeyTranslator } ;
840- use crate :: { hex_script, Error , ExtParams , RelLockTime , Satisfier , ToPublicKey , TranslatePk } ;
831+ use crate :: { hex_script, Error , ExtParams , RelLockTime , Satisfier , ToPublicKey } ;
841832
842833 type Segwitv0Script = Miniscript < bitcoin:: PublicKey , Segwitv0 > ;
843834 type Tapscript = Miniscript < bitcoin:: secp256k1:: XOnlyPublicKey , Tap > ;
0 commit comments