Skip to content

Commit

Permalink
Update NonEmptyList.fromList deprecation to suggest toOption() inst…
Browse files Browse the repository at this point in the history
…ead (#2832)

Coming from a discussion in StackOverFlow here https://stackoverflow.com/a/73893138/9440211.
  • Loading branch information
StylianosGakis committed Oct 4, 2022
1 parent 336692d commit 0813110
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ public class NonEmptyList<out A>(
@Deprecated(
"Use toNonEmptyListOrNull instead",
ReplaceWith(
"Option.fromNullable<NonEmptyList<A>>(l.toNonEmptyListOrNull())",
"l.toNonEmptyListOrNull().toOption()",
"import arrow.core.toNonEmptyListOrNull",
"import arrow.core.Option",
"import arrow.core.NonEmptyList"
"import arrow.core.toOption"
)
)
@JvmStatic
Expand Down

0 comments on commit 0813110

Please sign in to comment.