Skip to content

Commit

Permalink
deprecate orNull Either extension function (#2773)
Browse files Browse the repository at this point in the history
* remove orNull Either extension function

* set MetaSpace

* Update pull_request.yml
  • Loading branch information
i-walker committed Aug 3, 2022
1 parent 0eb7c44 commit 7bef773
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -1277,8 +1277,9 @@ public inline fun <B> Either<*, B>.getOrElse(default: () -> B): B =
* ```
* <!--- KNIT example-either-46.kt -->
*/
@Deprecated("Duplicated API. Please use Either's member function orNull. This will be removed towards Arrow 2.0", ReplaceWith("orNull()"))
public fun <B> Either<*, B>.orNull(): B? =
getOrElse { null }
orNull()

/**
* Returns the value from this [Right] or allows clients to transform [Left] to [Right] while providing access to
Expand Down

0 comments on commit 7bef773

Please sign in to comment.