Skip to content

Commit

Permalink
Improve separator determination
Browse files Browse the repository at this point in the history
  • Loading branch information
theEvilReaper committed May 26, 2024
1 parent abf8b81 commit 63a1d46
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ class ExtensionSpec internal constructor(
internal val joinedRawTypes by lazy {
if (genericType.isEmpty()) return@lazy EMPTY_STRING
val withComma = genericType.size > 1
genericType.joinToString(if (withComma) ", " else EMPTY_STRING) { it.getRawData() }
val separator = when (withComma) {
true -> ", "
false -> EMPTY_STRING
}
genericType.joinToString(separator) { it.getRawData() }
}

/**
Expand Down

0 comments on commit 63a1d46

Please sign in to comment.