Skip to content

Commit e01a0d4

Browse files
committed
replace foreach
1 parent 04a84ea commit e01a0d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/main/java/com/segment/analytics/kotlin/destinations/appsflyer/AppsflyerDestination.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,17 @@ class AppsFlyerDestination(
185185
is Number -> JsonPrimitive(value)
186186
is String -> JsonPrimitive(value)
187187
is Map<*, *> -> buildJsonObject {
188-
value.forEach { (k, v) ->
188+
for ((k, v) in value) {
189189
put(k.toString(), convertToPrimitive(v))
190190
}
191191
}
192192
is List<*> -> buildJsonArray {
193-
value.iterator().forEach { v ->
193+
for (v in value) {
194194
add(convertToPrimitive(v))
195195
}
196196
}
197197
is Array<*> -> buildJsonArray {
198-
value.forEach { v ->
198+
for (v in value) {
199199
add(convertToPrimitive(v))
200200
}
201201
}
@@ -207,7 +207,7 @@ class AppsFlyerDestination(
207207
// See https://segment.com/docs/spec/mobile/#install-attributed.
208208
val properties = buildJsonObject {
209209
put("provider", key)
210-
attributionData.forEach { (k, v) ->
210+
for ((k, v) in attributionData) {
211211
if (k !in setOf("media_source", "adgroup")) {
212212
put(k, convertToPrimitive(v))
213213
}

0 commit comments

Comments
 (0)