From 534815400c9f1f3a7cf61b98f9ef055c93c5ef24 Mon Sep 17 00:00:00 2001 From: Michael Bull Date: Mon, 11 May 2020 12:01:32 +0100 Subject: [PATCH] Improve var name consistency in BindingBenchmark --- .../michaelbull/result/BindingBenchmark.kt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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) }