Skip to content

Commit defe37f

Browse files
committed
fix sonar issues
1 parent de9b1c9 commit defe37f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aoc2020/aoc2020-kotlin/src/main/kotlin/de/havox_design/aoc2020/day21/AllergenAssessment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AllergenAssessment(private var filename: String) {
4545

4646
dictionary
4747
.entries
48-
.forEach { (allergen, possibleIngredients) ->
48+
.forEach { (allergen, possibleIngredients:Set<String>) ->
4949
possibleIngredients
5050
.forEach {
5151
reversedDictionary.putIfAbsent(it, mutableSetOf())
@@ -56,7 +56,7 @@ class AllergenAssessment(private var filename: String) {
5656
val solution = mutableMapOf<String, String>()
5757

5858
while (reversedDictionary.any { (_, value) -> value.size == 1 }) {
59-
val (ingredient, possibleAllergens) = reversedDictionary
59+
val (ingredient, possibleAllergens:Set<String>) = reversedDictionary
6060
.entries
6161
.first { (_, value) -> value.size == 1 }
6262
val allergen = possibleAllergens

0 commit comments

Comments
 (0)