aboutsummaryrefslogtreecommitdiff
path: root/core/encoding
diff options
context:
space:
mode:
authorKarl Zylinski <karl@zylinski.se>2023-11-01 00:57:27 +0100
committerKarl Zylinski <karl@zylinski.se>2023-11-01 00:57:27 +0100
commit75cb2c68cc1f75760d39cd7a41f91d65496843dd (patch)
tree7e2a65d8c57eca20306463e31dded728c9f1d623 /core/encoding
parent942e91f94c47fc6057da06f4aa320f9a150adfe1 (diff)
Cleanup of json.clone_value
Diffstat (limited to 'core/encoding')
-rw-r--r--core/encoding/json/types.odin6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/encoding/json/types.odin b/core/encoding/json/types.odin
index 60b3defa1..20c806236 100644
--- a/core/encoding/json/types.odin
+++ b/core/encoding/json/types.odin
@@ -119,10 +119,8 @@ clone_value :: proc(value: Value, allocator := context.allocator) -> Value {
}
return new_o
case Array:
- len := len(v)
- new_a := make(Array, len)
- vv := v
- for elem, idx in vv {
+ new_a := make(Array, len(v))
+ for elem, idx in v {
new_a[idx] = clone_value(elem)
}
return new_a