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