mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 23:10:09 +00:00
sort.binarySearch: Remove unneeded edge case check
This commit is contained in:
parent
b7e72cc421
commit
f5f77089b7
@ -6,9 +6,6 @@ const math = std.math;
|
||||
const builtin = @import("builtin");
|
||||
|
||||
pub fn binarySearch(comptime T: type, key: T, items: []const T, comptime compareFn: fn (lhs: T, rhs: T) math.Order) ?usize {
|
||||
if (items.len < 1)
|
||||
return null;
|
||||
|
||||
var left: usize = 0;
|
||||
var right: usize = items.len;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user