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