Skip to content

Commit

Permalink
Add back in helper function _translate_pk
Browse files Browse the repository at this point in the history
Recently while removing recursion I mistakenly removed the
`_translate_pk` function forgetting that this was a trick to prevent
compilation explosion caused by the generics.
  • Loading branch information
tcharding committed Oct 11, 2023
1 parent 1ed13a9 commit aeb1a7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/policy/concrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,14 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
///
/// For example usage please see [`crate::policy::semantic::Policy::translate_pk`].
pub fn translate_pk<Q, E, T>(&self, t: &mut T) -> Result<Policy<Q>, E>
where
T: Translator<Pk, Q, E>,
Q: MiniscriptKey,
{
self._translate_pk(t)
}

fn _translate_pk<Q, E, T>(&self, t: &mut T) -> Result<Policy<Q>, E>
where
T: Translator<Pk, Q, E>,
Q: MiniscriptKey,
Expand Down

0 comments on commit aeb1a7c

Please sign in to comment.