Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdrag00nv2 committed Jul 31, 2023
1 parent ff1207f commit 4cac1eb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions runtime/interpreter/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -2989,10 +2989,8 @@ func (v *ArrayValue) Filter(
return invocation
}

iterator, err := v.array.Iterator()

i := 0
err = v.array.Iterate(
err := v.array.Iterate(
func(item atree.Value) (bool, error) {
arrayElement := MustConvertStoredValue(interpreter, item)

Expand All @@ -3013,6 +3011,11 @@ func (v *ArrayValue) Filter(
panic(errors.NewExternalError(err))
}

iterator, err := v.array.Iterator()
if err != nil {
panic(errors.NewExternalError(err))
}

return NewArrayValueWithIterator(
interpreter,
NewVariableSizedStaticType(interpreter, v.Type.ElementType()),
Expand Down

0 comments on commit 4cac1eb

Please sign in to comment.