Swap mismatched docs for Result.onSuccess/onFailure KT-30109

This commit is contained in:
Ilya Gorbunov
2019-02-26 20:55:42 +03:00
parent 908009bf42
commit 19bd326810
+2 -2
View File
@@ -304,7 +304,7 @@ public inline fun <R, T : R> Result<T>.recoverCatching(transform: (exception: Th
// "peek" onto value/exception and pipe // "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. * Returns the original `Result` unchanged.
*/ */
@InlineOnly @InlineOnly
@@ -318,7 +318,7 @@ public inline fun <T> Result<T>.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. * Returns the original `Result` unchanged.
*/ */
@InlineOnly @InlineOnly