diff --git a/src/benchmark/kotlin/com/github/michaelbull/result/BindingBenchmark.kt b/src/benchmark/kotlin/com/github/michaelbull/result/BindingBenchmark.kt index 5b06005..729e3d1 100644 --- a/src/benchmark/kotlin/com/github/michaelbull/result/BindingBenchmark.kt +++ b/src/benchmark/kotlin/com/github/michaelbull/result/BindingBenchmark.kt @@ -39,24 +39,22 @@ class BindingBenchmark { @Benchmark fun andThenSuccess(blackhole: Blackhole) { - val result = - provideX().andThen { first -> - provideY().andThen { second -> - Ok(first + second) - } + val result = provideX().andThen { x -> + provideY().andThen { y -> + Ok(x + y) } + } blackhole.consume(result) } @Benchmark fun andThenFailure(blackhole: Blackhole) { - val result = - provideX().andThen { first -> - provideZ().andThen { second -> - Ok(first + second) - } + val result = provideX().andThen { x -> + provideZ().andThen { z -> + Ok(x + z) } + } blackhole.consume(result) }