pop: break endless loop

This commit is contained in:
Emery Hemingway 2024-06-10 12:35:59 +03:00
parent 6f1c26e34f
commit 560a6417a3
2 changed files with 2 additions and 1 deletions

View File

@ -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"

View File

@ -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`.