Browse Source

removed incorrect requirement for key type to be ordered in binary_search_by

Matija Dizdar 1 year ago
parent
commit
526d338300
1 changed files with 0 additions and 1 deletions
  1. 0 1
      core/slice/slice.odin

+ 0 - 1
core/slice/slice.odin

@@ -171,7 +171,6 @@ binary_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool)
 
 
 @(require_results)
 @(require_results)
 binary_search_by :: proc(array: $A/[]$T, key: T, f: proc(T, T) -> Ordering) -> (index: int, found: bool)
 binary_search_by :: proc(array: $A/[]$T, key: T, f: proc(T, T) -> Ordering) -> (index: int, found: bool)
-	where intrinsics.type_is_ordered(T) #no_bounds_check
 {
 {
 	// INVARIANTS:
 	// INVARIANTS:
 	// - 0 <= left <= (left + size = right) <= len(array)
 	// - 0 <= left <= (left + size = right) <= len(array)