From f97e953c260541373623a0b08b487de5697a5e42 Mon Sep 17 00:00:00 2001 From: Jordan Hrycaj Date: Thu, 25 Nov 2021 17:40:29 +0000 Subject: [PATCH] Fix canonical name why: The name clear() is commonly used as reset function. --- stew/sorted_set.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stew/sorted_set.nim b/stew/sorted_set.nim index 440d18d..337deef 100644 --- a/stew/sorted_set.nim +++ b/stew/sorted_set.nim @@ -64,6 +64,8 @@ export RbInfo, RbResult, `isRed=`, # no need to export all of `rbtree_desc` + `linkLeft=`, + `linkRight=`, results type @@ -129,7 +131,7 @@ proc move*[K,V](sl: var SortedSet[K,V]): SortedSet[K,V] = result.tree = sl.tree sl.init -proc reset*[K,V](sl: var SortedSet[K,V]) = +proc clear*[K,V](sl: var SortedSet[K,V]) = ## Reset list descriptor to its inital value. This function also de-registers ## and flushes all traversal descriptors of type `SortedSetWalkRef`. sl.tree.rbTreeReset(clup = proc(c: var SortedSetItemRef[K,V]) = c.slstClup)