authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-05-13 18:38:03+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-05-13 18:38:03+03:00
log76681e6b9689c4df78b6451da1aa857dc08a84d2
tree26cd5fbd09b70a20b42c77dfd9251a01c6e9e7d2
parentbe2b8d58ef9459d3e6a4c294be4fd4b82c71bdb1
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Make PriorityQueue.Iterator public

The `iterator` function was already public but these seem to have been forgotten.

1 files changed, 3 insertions(+), 3 deletions(-)

lib/std/priority_queue.zig+3-3
......@@ -185,18 +185,18 @@ pub fn PriorityQueue(comptime T: type) type {
185185 self.len = new_len;
186186 }
187187
188 const Iterator = struct {
188 pub const Iterator = struct {
189189 queue: *PriorityQueue(T),
190190 count: usize,
191191
192 fn next(it: *Iterator) ?T {
192 pub fn next(it: *Iterator) ?T {
193193 if (it.count > it.queue.len - 1) return null;
194194 const out = it.count;
195195 it.count += 1;
196196 return it.queue.items[out];
197197 }
198198
199 fn reset(it: *Iterator) void {
199 pub fn reset(it: *Iterator) void {
200200 it.count = 0;
201201 }
202202 };