diff --git a/golem-rust/src/transaction/compfn.rs b/golem-rust/src/transaction/compfn.rs index 42e12d1..716be63 100644 --- a/golem-rust/src/transaction/compfn.rs +++ b/golem-rust/src/transaction/compfn.rs @@ -65,53 +65,9 @@ where } } } -// -// impl CompensationFunction<(In,), (Out,), (Err,)> for F -// where -// F: FnOnce(Option>, In) -> Result<(), Err>, -// { -// fn call( -// self, -// input: impl TupleOrUnit<(In,)>, -// result: Option, (Err,)>>, -// ) -> Result<(), (Err,)> { -// let input = input.into(); -// match result { -// Some(Ok(out)) => { -// let (out,) = out.into(); -// self(Some(Ok(out)), input.0).map_err(|err| (err,)) -// } -// Some(Err((err,))) => self(Some(Err(err)), input.0).map_err(|err| (err,)), -// None => self(None, input.0).map_err(|err| (err,)), -// } -// } -// } -// -// impl CompensationFunction<(In1, In2), (Out,), (Err,)> for F -// where -// F: FnOnce(Option>, In1, In2) -> Result<(), Err>, -// { -// fn call( -// self, -// input: impl TupleOrUnit<(In1, In2)>, -// result: Option, (Err,)>>, -// ) -> Result<(), (Err,)> { -// let input = input.into(); -// match result { -// Some(Ok(out)) => { -// let (out,) = out.into(); -// self(Some(Ok(out)), input.0, input.1).map_err(|err| (err,)) -// } -// Some(Err((err,))) => self(Some(Err(err)), input.0, input.1).map_err(|err| (err,)), -// None => self(None, input.0, input.1).map_err(|err| (err,)), -// } -// } -// } impl TupleOrUnit<()> for T { - fn into(self) -> () { - () - } + fn into(self) {} } macro_rules! tuple_or_unit {