Skip to content

Commit

Permalink
refactor(#31): update NotEmptyCollection.size property
Browse files Browse the repository at this point in the history
  • Loading branch information
LVMVRQUXL committed Mar 14, 2023
1 parent a5b4e10 commit f0e931c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public sealed interface NotEmptyCollection<out E> {

/** The size of this collection. */
public val size: StrictlyPositiveInt
get() = tail.sizeOrZero.toInt()
.plus(1)
get() = tail.sizeOrZero.plus(1)
.toStrictlyPositiveInt()
.getOrThrow()

Expand Down

0 comments on commit f0e931c

Please sign in to comment.