about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-07-12 18:12:55 +0200
committerbptato <nincsnevem662@gmail.com>2022-07-12 18:12:55 +0200
commit2f0ea08df1e6884da51ea510cc352395e853cfc0 (patch)
tree214aef273f772a8ad657039097cb7c9134ba9f7d /src/utils
parent1abd3aadf0c999c6e26ba4e7910b5abe3510c6c2 (diff)
downloadchawan-2f0ea08df1e6884da51ea510cc352395e853cfc0.tar.gz
Fix a tokenizer bug, clean up some warnings
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/radixtree.nim28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/utils/radixtree.nim b/src/utils/radixtree.nim
index f4ef5fb0..1ea32997 100644
--- a/src/utils/radixtree.nim
+++ b/src/utils/radixtree.nim
@@ -43,20 +43,20 @@ iterator keys*[T](node: RadixNode[T]): string =
     yield node.children[i].k
     inc i
 
-func contains[T](node: RadixNode[T], k: string): bool =
-  var i = 0
-  while i < node.children.len:
-    if node.children[i].k[0] == k[0]:
-      if k.len != node.children[i].k.len:
-        return false
-      var j = 1
-      while j < k.len:
-        if node.children[i].k[j] != k[j]:
-          return false
-        inc j
-      return true
-    inc i
-  return false
+#func contains[T](node: RadixNode[T], k: string): bool =
+#  var i = 0
+#  while i < node.children.len:
+#    if node.children[i].k[0] == k[0]:
+#      if k.len != node.children[i].k.len:
+#        return false
+#      var j = 1
+#      while j < k.len:
+#        if node.children[i].k[j] != k[j]:
+#          return false
+#        inc j
+#      return true
+#    inc i
+#  return false
 
 # O(1) add procedures for insert
 proc add[T](node: RadixNode[T], k: string, v: T) =