Skip to content

Commit a5aa6a2

Browse files
committed
node: add inference prameter to RedeemNode::to_construct_node
Same as before, quick change, no tests..
1 parent a534de4 commit a5aa6a2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/node/redeem.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,16 @@ impl<J: Jet> RedeemNode<J> {
219219

220220
/// Convert a [`RedeemNode`] back into a [`ConstructNode`]
221221
/// by loosening the finalized types, witness data and disconnected branches.
222-
pub fn to_construct_node<'brand>(&self) -> Arc<ConstructNode<'brand, J>> {
223-
struct ToConstruct<'brand, J> {
224-
inference_context: types::Context<'brand>,
222+
pub fn to_construct_node<'brand>(
223+
&self,
224+
inference_context: &types::Context<'brand>,
225+
) -> Arc<ConstructNode<'brand, J>> {
226+
struct ToConstruct<'a, 'brand, J> {
227+
inference_context: &'a types::Context<'brand>,
225228
phantom: PhantomData<J>,
226229
}
227230

228-
impl<'brand, J: Jet> Converter<Redeem<J>, Construct<'brand, J>> for ToConstruct<'brand, J> {
231+
impl<'brand, J: Jet> Converter<Redeem<J>, Construct<'brand, J>> for ToConstruct<'_, 'brand, J> {
229232
type Error = ();
230233

231234
fn convert_witness(
@@ -258,13 +261,13 @@ impl<J: Jet> RedeemNode<J> {
258261
let inner = inner
259262
.map(|node| node.cached_data())
260263
.map_witness(|maybe_value| maybe_value.clone());
261-
Ok(ConstructData::from_inner(&self.inference_context, inner)
264+
Ok(ConstructData::from_inner(self.inference_context, inner)
262265
.expect("types were already finalized"))
263266
}
264267
}
265268

266269
self.convert::<InternalSharing, _, _>(&mut ToConstruct {
267-
inference_context: types::Context::new(),
270+
inference_context,
268271
phantom: PhantomData,
269272
})
270273
.unwrap()

0 commit comments

Comments
 (0)