From 19bd326810b7e4adb73ac0117f01dfe2a70bd450 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 26 Feb 2019 20:55:42 +0300 Subject: [PATCH] Swap mismatched docs for Result.onSuccess/onFailure KT-30109 --- libraries/stdlib/src/kotlin/util/Result.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/stdlib/src/kotlin/util/Result.kt b/libraries/stdlib/src/kotlin/util/Result.kt index 828b6712e16..b1d56e5070d 100644 --- a/libraries/stdlib/src/kotlin/util/Result.kt +++ b/libraries/stdlib/src/kotlin/util/Result.kt @@ -304,7 +304,7 @@ public inline fun Result.recoverCatching(transform: (exception: Th // "peek" onto value/exception and pipe /** - * Performs the given [action] on encapsulated value if this instance represents [success][Result.isSuccess]. + * Performs the given [action] on encapsulated exception if this instance represents [failure][Result.isFailure]. * Returns the original `Result` unchanged. */ @InlineOnly @@ -318,7 +318,7 @@ public inline fun Result.onFailure(action: (exception: Throwable) -> Unit } /** - * Performs the given [action] on encapsulated exception if this instance represents [failure][Result.isFailure]. + * Performs the given [action] on encapsulated value if this instance represents [success][Result.isSuccess]. * Returns the original `Result` unchanged. */ @InlineOnly