Skip to content

Commit de9b1c9

Browse files
committed
fix sonar issues
1 parent 6a2582e commit de9b1c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aoc2020/aoc2020-kotlin/src/main/kotlin/de/havox_design/aoc2020/day16/TicketTranslation.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TicketTranslation(private var filename: String) {
4949
.filter { (_, it) -> it.contains(name) }
5050

5151
if (possibleIndices.size == 1) {
52-
val (index, _) = possibleIndices.first()
52+
val (index, _:Set<String>) = possibleIndices.first()
5353
solvedFields[index] = name
5454
possibleFieldNames[index].clear()
5555
possibleFieldNames.forEach { it.remove(name) }
@@ -58,8 +58,8 @@ class TicketTranslation(private var filename: String) {
5858

5959
possibleFieldNames
6060
.withIndex()
61-
.filter { (_, names) -> names.size == 1 }
62-
.forEach { (index, names) ->
61+
.filter { (_, names:Set<String>) -> names.size == 1 }
62+
.forEach { (index, names:Set<String>) ->
6363
val name = names.first()
6464
solvedFields[index] = name
6565
possibleFieldNames[index].clear()

0 commit comments

Comments
 (0)