Merge pull request #7991 from xuwei-k/lazyZip

[2.x] use `lazyZip`
This commit is contained in:
eugene yokota 2025-01-01 03:06:26 -05:00 committed by GitHub
commit 8be482533a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -333,7 +333,7 @@ private[sbt] object SettingCompletions {
else if (showDescriptions) {
val withDescriptions = in map { case (id, key) => (id, description(key)) }
val padded = CommandUtil.aligned("", " ", withDescriptions)
padded.zip(in).map { case (line, (id, _)) =>
padded.lazyZip(in).map { case (line, (id, _)) =>
Completion.tokenDisplay(append = appendString(id), display = line + "\n")
}
} else

View File

@ -63,7 +63,7 @@ trait ChangeReport[T] {
override def toString = {
val labels = List("Checked", "Modified", "Unmodified", "Added", "Removed")
val sets = List(checked, modified, unmodified, added, removed)
val keyValues = labels.zip(sets).map { case (label, set) => label + ": " + set.mkString(", ") }
val keyValues = labels.lazyZip(sets).map { (label, set) => label + ": " + set.mkString(", ") }
keyValues.mkString("Change report:\n\t", "\n\t", "")
}