Skip to content

Commit 64222d7

Browse files
committed
Merge #616: Remove unnecessary helper function
927735e Remove unnecessary helper function (Tobin C. Harding) Pull request description: 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). ACKs for top commit: apoelstra: ACK 927735e Tree-SHA512: 9d654a040bb26376379aefe5927188137a73cb7fc5d48a75041db2f851ad5970ec642317b83d976bd5e6d37e6b9d68adc63d0c196b1e93186fc9a622b5ef0c62
2 parents 29b612c + 927735e commit 64222d7

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)