Skip to content

Commit

Permalink
events: Replace Enum.values() with Enum.entries
Browse files Browse the repository at this point in the history
Signed-off-by: Jakob K <[email protected]>
  • Loading branch information
jakobkmar committed Jul 30, 2023
1 parent 6354c5e commit ef47519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ open class Event<T, S : EventScope>(val scopeSupplier: () -> S) {
*/
@InternalSilkApi
val listenersByPriority: List<MutableList<context(S, MutableEventScope) (T) -> Unit>> = buildList {
repeat(EventPriority.values().size) {
repeat(EventPriority.entries.size) {
add(ArrayList())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class EventTest : FunSpec({
}

testListenReceive(EventPriority.NORMAL)
EventPriority.values().forEach {
EventPriority.entries.forEach {
testListenReceive(it)
}
}
Expand Down Expand Up @@ -94,7 +94,7 @@ class EventTest : FunSpec({
}

testListenReceive(EventPriority.NORMAL)
EventPriority.values().forEach {
EventPriority.entries.forEach {
testListenReceive(it)
}
}
Expand Down

0 comments on commit ef47519

Please sign in to comment.