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) {
66
66
else -> throw Exception (" Undetected type for: $this " )
67
67
}
68
68
69
+ // Collection `flattenIfPossible`` functions
69
70
@InternalApi
70
71
@JvmName(" noOpUnnestedCollection" )
71
72
public inline fun <reified T > Collection<T>.flattenIfPossible (): Collection <T > = this
72
73
73
74
@InternalApi
74
75
@JvmName(" flattenNestedCollection" )
75
76
public 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