aboutsummaryrefslogtreecommitdiff
path: root/lib/std/priority_queue.zig
diff options
context:
space:
mode:
authorBhargav Srinivasan <bsvasan92@icloud.com>2020-09-22 05:12:21 -0700
committerBhargav Srinivasan <bsvasan92@icloud.com>2020-09-22 05:12:21 -0700
commit84406d98e4fd8032b544eba7b5f9d3ed78e67e6c (patch)
tree7934ce95048cba579c7a77d488d7d62b31f7120d /lib/std/priority_queue.zig
parent778bb4b324f4764386f55781d70e8167f1dd1abc (diff)
downloadzig-84406d98e4fd8032b544eba7b5f9d3ed78e67e6c.tar.gz
zig-84406d98e4fd8032b544eba7b5f9d3ed78e67e6c.zip
removing redundant assert
Diffstat (limited to 'lib/std/priority_queue.zig')
-rw-r--r--lib/std/priority_queue.zig1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/std/priority_queue.zig b/lib/std/priority_queue.zig
index 2769e7aa02..f5ff4800e8 100644
--- a/lib/std/priority_queue.zig
+++ b/lib/std/priority_queue.zig
@@ -196,7 +196,6 @@ pub fn PriorityQueue(comptime T: type) type {
pub fn update(self: *Self, elem: T, new_elem: T) !void {
var update_index: usize = std.mem.indexOfScalar(T, self.items, elem) orelse return error.ElementNotFound;
- assert (update_index >= 0 and update_index < self.items.len);
const old_elem: T = self.items[update_index];
self.items[update_index] = new_elem;
if (self.compareFn(new_elem, old_elem)) {