diff options
| author | 2021-05-12 22:52:55 +0000 | |
|---|---|---|
| committer | 2021-05-12 22:52:55 +0000 | |
| commit | 51a1b7d0825095429054d639e7aecb882a930229 (patch) | |
| tree | 26ae040b1a634aa2f7abc7e9359aeb4e4503a139 /tools/codegen/src | |
| parent | 47592cbceebed0bbea0c77f7c33d6320a276f006 (diff) | |
| parent | c2db9c85cc6b2a1c566ad1bbae0a17099b9dac5f (diff) | |
Merge "Revert "Fix incompatibilities with Kotlin 1.5.0"" am: f1e2bb9a81 am: c2db9c85cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705633
Change-Id: I39fdc7fb9ad8109e51e2d3bdee1bc4fb3354a247
Diffstat (limited to 'tools/codegen/src')
| -rw-r--r-- | tools/codegen/src/com/android/codegen/Utils.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/codegen/src/com/android/codegen/Utils.kt b/tools/codegen/src/com/android/codegen/Utils.kt index a117aa09ab62..c19ae3b0b11f 100644 --- a/tools/codegen/src/com/android/codegen/Utils.kt +++ b/tools/codegen/src/com/android/codegen/Utils.kt @@ -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 }.maxOrNull()!! - val col2w = map { (_, b) -> b.length }.maxOrNull()!! + val col1w = map { (a, _) -> a.length }.max()!! + val col2w = map { (_, b) -> b.length }.max()!! return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n") } |