Skip to content

Commit

Permalink
Remove unnecessary transfer call
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdrag00nv2 committed Sep 24, 2023
1 parent 839556c commit e7a7725
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions runtime/interpreter/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -1429,26 +1429,14 @@ func (v *StringValue) Split(inter *Interpreter, locationRange LocationRange, sep
}

str := split[index]
strValue := NewStringValue(
index++
return NewStringValue(
inter,
common.NewStringMemoryUsage(len(str)),
func() string {
return str
},
)

index++

value := strValue.Transfer(
inter,
locationRange,
atree.Address{},
true,
nil,
nil,
)

return value
},
)
}
Expand Down

0 comments on commit e7a7725

Please sign in to comment.