Skip to content

Commit 927735e

Browse files
committed
Remove unnecessary helper function
The `_translate_pk` helper function adds nothing to the code. It comes from a day past when the signature of `translate_pk` and `_translate_pk` differed (see commit ef1d69c).
1 parent 29b612c commit 927735e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/policy/semantic.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
127127
/// assert_eq!(real_policy, expected_policy);
128128
/// ```
129129
pub fn translate_pk<Q, E, T>(&self, t: &mut T) -> Result<Policy<Q>, E>
130-
where
131-
T: Translator<Pk, Q, E>,
132-
Q: MiniscriptKey,
133-
{
134-
self._translate_pk(t)
135-
}
136-
137-
fn _translate_pk<Q, E, T>(&self, t: &mut T) -> Result<Policy<Q>, E>
138130
where
139131
T: Translator<Pk, Q, E>,
140132
Q: MiniscriptKey,
@@ -151,7 +143,7 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
151143
Policy::Older(n) => Ok(Policy::Older(n)),
152144
Policy::Threshold(k, ref subs) => {
153145
let new_subs: Result<Vec<Policy<Q>>, _> =
154-
subs.iter().map(|sub| sub._translate_pk(t)).collect();
146+
subs.iter().map(|sub| sub.translate_pk(t)).collect();
155147
new_subs.map(|ok| Policy::Threshold(k, ok))
156148
}
157149
}

0 commit comments

Comments
 (0)