| ... | ... | @@ -185,18 +185,18 @@ pub fn PriorityQueue(comptime T: type) type { |
| 185 | 185 | self.len = new_len; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | | const Iterator = struct { |
| 188 | pub const Iterator = struct { |
| 189 | 189 | queue: *PriorityQueue(T), |
| 190 | 190 | count: usize, |
| 191 | 191 | |
| 192 | | fn next(it: *Iterator) ?T { |
| 192 | pub fn next(it: *Iterator) ?T { |
| 193 | 193 | if (it.count > it.queue.len - 1) return null; |
| 194 | 194 | const out = it.count; |
| 195 | 195 | it.count += 1; |
| 196 | 196 | return it.queue.items[out]; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | | fn reset(it: *Iterator) void { |
| 199 | pub fn reset(it: *Iterator) void { |
| 200 | 200 | it.count = 0; |
| 201 | 201 | } |
| 202 | 202 | }; |