pop: break endless loop
This commit is contained in:
parent
6f1c26e34f
commit
560a6417a3
|
@ -7,7 +7,7 @@
|
||||||
"bom-ref": "pkg:nim/preserves",
|
"bom-ref": "pkg:nim/preserves",
|
||||||
"name": "preserves",
|
"name": "preserves",
|
||||||
"description": "data model and serialization format",
|
"description": "data model and serialization format",
|
||||||
"version": "20240608",
|
"version": "20240610",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Emery Hemingway"
|
"name": "Emery Hemingway"
|
||||||
|
|
|
@ -152,6 +152,7 @@ proc pop*(pr: var Value; key: Value; val: var Value): bool =
|
||||||
val = move pr.dict[i].val
|
val = move pr.dict[i].val
|
||||||
delete(pr.dict, i .. i)
|
delete(pr.dict, i .. i)
|
||||||
return true
|
return true
|
||||||
|
inc i
|
||||||
|
|
||||||
proc `[]`*(pr, key: Value): Value {.deprecated: "use step instead".} =
|
proc `[]`*(pr, key: Value): Value {.deprecated: "use step instead".} =
|
||||||
## Select a value by `key` from `pr`.
|
## Select a value by `key` from `pr`.
|
||||||
|
|
Loading…
Reference in New Issue