diff options
author | Aurimas Liutikas <aurimas@google.com> | 2021-05-12 23:09:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-12 23:09:41 +0000 |
commit | b357fadd1ed9c7d073b358864953113214d537b8 (patch) | |
tree | 40e1fa65b45caa9bf17b58f4a71cec75d1404621 /tools | |
parent | dd9dcdfb72b89002122ecbe03606b78d4012899f (diff) | |
parent | 51a1b7d0825095429054d639e7aecb882a930229 (diff) |
Merge "Revert "Fix incompatibilities with Kotlin 1.5.0"" am: f1e2bb9a81 am: c2db9c85cc am: 51a1b7d082
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705633
Change-Id: I20f9e94bb3241e07052edbe8c042162c2ad6f118
Diffstat (limited to 'tools')
-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 9ceb2042d74e..7cfa7847fcff 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") } |