Skip to content

Commit 8ce876a

Browse files
committed
Refactored the EitherAssert factory method
1 parent e72291f commit 8ce876a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/kotlin/in/rcard/assertj/arrowcore/EitherAssert.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import arrow.core.Either
1212
class EitherAssert<LEFT : Any, RIGHT : Any>(either: Either<LEFT, RIGHT>?) :
1313
AbstractEitherAssert<EitherAssert<LEFT, RIGHT>, LEFT, RIGHT>(either) {
1414
companion object {
15-
fun <LEFT : Any, RIGHT : Any> assertThat(actual: Either<LEFT, RIGHT>?): EitherAssert<LEFT, RIGHT> {
16-
return EitherAssert(actual)
17-
}
15+
fun <LEFT : Any, RIGHT : Any> assertThat(actual: Either<LEFT, RIGHT>?): EitherAssert<LEFT, RIGHT> =
16+
EitherAssert(actual)
1817
}
1918
}

0 commit comments

Comments
 (0)