Merge "Revert^2 "Fix incompatibilities with Kotlin 1.5.0""

This commit is contained in:
Treehugger Robot
2021-05-18 20:54:38 +00:00
committed by Gerrit Code Review
3 changed files with 4 additions and 4 deletions

View File

@@ -43,8 +43,8 @@ inline infix fun Int.times(action: () -> Unit) {
* cccc dd
*/
fun Iterable<Pair<String, String>>.columnize(separator: String = " | "): String {
val col1w = map { (a, _) -> a.length }.max()!!
val col2w = map { (_, b) -> b.length }.max()!!
val col1w = map { (a, _) -> a.length }.maxOrNull()!!
val col2w = map { (_, b) -> b.length }.maxOrNull()!!
return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n")
}