From 927735e1fa2e22f5fe6cc7540c77431ba188f923 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 13 Oct 2023 09:37:54 +1100 Subject: [PATCH] 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 ef1d69c81e3acc34ed2ce71b6484d719cc631ab6). --- src/policy/semantic.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/policy/semantic.rs b/src/policy/semantic.rs index 9636c0d2a..dc84a9439 100644 --- a/src/policy/semantic.rs +++ b/src/policy/semantic.rs @@ -127,14 +127,6 @@ impl Policy { /// assert_eq!(real_policy, expected_policy); /// ``` pub fn translate_pk(&self, t: &mut T) -> Result, E> - where - T: Translator, - Q: MiniscriptKey, - { - self._translate_pk(t) - } - - fn _translate_pk(&self, t: &mut T) -> Result, E> where T: Translator, Q: MiniscriptKey, @@ -151,7 +143,7 @@ impl Policy { Policy::Older(n) => Ok(Policy::Older(n)), Policy::Threshold(k, ref subs) => { let new_subs: Result>, _> = - subs.iter().map(|sub| sub._translate_pk(t)).collect(); + subs.iter().map(|sub| sub.translate_pk(t)).collect(); new_subs.map(|ok| Policy::Threshold(k, ok)) } }