From 84e7b25468fde5a1424ac2d4c8522b084c40b8da Mon Sep 17 00:00:00 2001 From: Yuriy Davygora Date: Wed, 13 May 2026 09:42:42 +0200 Subject: [PATCH] Just a little improvement, no code change --- .../davygora/matrix/util/IterableUtils.kt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/kotlin/org/duckdns/davygora/matrix/util/IterableUtils.kt b/src/main/kotlin/org/duckdns/davygora/matrix/util/IterableUtils.kt index 835c26d..32ca064 100644 --- a/src/main/kotlin/org/duckdns/davygora/matrix/util/IterableUtils.kt +++ b/src/main/kotlin/org/duckdns/davygora/matrix/util/IterableUtils.kt @@ -4,18 +4,18 @@ package org.duckdns.davygora.matrix.util inline fun Any.toListChecked(): List = when (this) { is List<*> -> this - is Collection<*> -> this.toList() - is Iterable<*> -> this.toList() - is Sequence<*> -> this.toList() - is Array<*> -> this.asList() - is BooleanArray -> this.asList() - is ByteArray -> this.asList() - is CharArray -> this.asList() - is DoubleArray -> this.asList() - is FloatArray -> this.asList() - is IntArray -> this.asList() - is LongArray -> this.asList() - is ShortArray -> this.asList() + is Collection<*> -> toList() + is Iterable<*> -> toList() + is Sequence<*> -> toList() + is Array<*> -> asList() + is BooleanArray -> asList() + is ByteArray -> asList() + is CharArray -> asList() + is DoubleArray -> asList() + is FloatArray -> asList() + is IntArray -> asList() + is LongArray -> asList() + is ShortArray -> asList() else -> error("Unsupported type: ${this::class}") }.also { list -> require(list.all { it is T })