summaryrefslogtreecommitdiff
path: root/lib/std/search.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-12-07 00:28:45 -0800
committerOri Bernstein <ori@eigenstate.org>2016-12-07 00:28:45 -0800
commit96203fff1cc3c06bea79801d9af38c40e556d74a (patch)
treebc173515812ea7d5027cca840e226e52476c35dd /lib/std/search.myr
parent51567134bf91de89705a64670abae17514ecc55a (diff)
downloadmc-96203fff1cc3c06bea79801d9af38c40e556d74a.tar.gz
Fix bsearch on empty slices.
Diffstat (limited to 'lib/std/search.myr')
-rw-r--r--lib/std/search.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/search.myr b/lib/std/search.myr
index e5abd99..8ae364f 100644
--- a/lib/std/search.myr
+++ b/lib/std/search.myr
@@ -22,7 +22,7 @@ generic lsearch = {sl, key, cmp
/* binary search over a sorted list of values. */
generic bsearch = {sl, key, cmp
- var hi, lo, mid : usize
+ var hi, lo, mid : size
lo = 0
hi = sl.len - 1