File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/util Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,20 @@ public fun Any?.type(): String = when (this) {
6666 else -> throw Exception (" Undetected type for: $this " )
6767}
6868
69+ // Collection `flattenIfPossible`` functions
6970@InternalApi
7071@JvmName(" noOpUnnestedCollection" )
7172public inline fun <reified T > Collection<T>.flattenIfPossible (): Collection <T > = this
7273
7374@InternalApi
7475@JvmName(" flattenNestedCollection" )
7576public inline fun <reified T > Collection<Collection<T>>.flattenIfPossible (): Collection <T > = flatten()
77+
78+ // List `flattenIfPossible` functions
79+ @InternalApi
80+ @JvmName(" noOpUnnestedCollection" )
81+ public inline fun <reified T > List<T>.flattenIfPossible (): List <T > = this
82+
83+ @InternalApi
84+ @JvmName(" flattenNestedCollection" )
85+ public inline fun <reified T > List<List<T>>.flattenIfPossible (): List <T > = flatten()
You can’t perform that action at this time.
0 commit comments