about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-01-17 19:27:42 +0100
committerbptato <nincsnevem662@gmail.com>2024-01-17 19:27:42 +0100
commit58ae65ed182a8a78d67756ec62f30261b9ef6c87 (patch)
treedd4d18c489cbcbdd0a0848084070e607332df5f2 /src/utils
parent0bcaa12bb343bfc7b7c1fe70649a378d8647b256 (diff)
downloadchawan-58ae65ed182a8a78d67756ec62f30261b9ef6c87.tar.gz
utils/map: remove unused special case
Even if it were used, it's UB...
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/map.nim3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/utils/map.nim b/src/utils/map.nim
index e4681c51..4966fcb6 100644
--- a/src/utils/map.nim
+++ b/src/utils/map.nim
@@ -1,9 +1,6 @@
 import std/algorithm
 
 func searchInMap*[U, T](a: openArray[(U, T)], u: U): int =
-  when not (typeof(u) is U):
-    if c > cast[typeof(c)](high(U)):
-      return -1
   binarySearch(a, u, proc(x: (U, T), y: U): int = cmp(x[0], y))
 
 func isInMap*[U, T](a: openArray[(U, T)], u: U): bool =