Skip to content

Commit

Permalink
return assert
Browse files Browse the repository at this point in the history
  • Loading branch information
oveeernight committed Aug 26, 2024
1 parent 6e486c1 commit 6e476be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class NumericConstraintsTests {
companion object {
const val RANDOM_TEST_1_ITERATIONS = 100//100_000
const val RANDOM_TEST_2_ITERATIONS = 100//1_000_000
const val RANDOM_TEST_3_ITERATIONS = 100//1_000_000
const val RANDOM_TEST_3_ITERATIONS = 1_000_000
const val RANDOM_TEST_4_ITERATIONS = 50//1_000_000
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ class TrieNode<E>(
return this
}

fun isEmpty() = firstOrNull() == null
fun isNotEmpty() = firstOrNull() != null
fun isEmpty() = singleOrNull() == null
fun isNotEmpty() = singleOrNull() != null

fun remove(element: E, owner: MutabilityOwnership): TrieNode<E> =
mutableRemove(element.hashCode(), element, 0, owner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ internal class TrieNodeIterator<out E> {
}

fun nextElement(): E {
assert(hasNextElement())
@Suppress("UNCHECKED_CAST")
return buffer[index++] as E
}
Expand Down

0 comments on commit 6e476be

Please sign in to comment.