Skip to content

Commit 75ee0d1

Browse files
committed
Cleaned up a little unnecessary code.
1 parent 7d6e654 commit 75ee0d1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

executor.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,7 @@ func dethunkMapBreadthFirst(m map[string]interface{}, dethunkQueue *dethunkQueue
319319
if f, ok := v.(func() interface{}); ok {
320320
m[k] = f()
321321
}
322-
}
323-
for _, v := range m {
324-
switch val := v.(type) {
322+
switch val := m[k].(type) {
325323
case map[string]interface{}:
326324
dethunkQueue.push(func() { dethunkMapBreadthFirst(val, dethunkQueue) })
327325
case []interface{}:
@@ -335,9 +333,7 @@ func dethunkListBreadthFirst(list []interface{}, dethunkQueue *dethunkQueue) {
335333
if f, ok := v.(func() interface{}); ok {
336334
list[i] = f()
337335
}
338-
}
339-
for _, v := range list {
340-
switch val := v.(type) {
336+
switch val := list[i].(type) {
341337
case map[string]interface{}:
342338
dethunkQueue.push(func() { dethunkMapBreadthFirst(val, dethunkQueue) })
343339
case []interface{}:

0 commit comments

Comments
 (0)