Skip to content

Commit 4e188dd

Browse files
AlxHnrVexu
authored andcommitted
Update docs of PriorityQueue.iterator() and PriorityDeque.iterator()
1 parent 1302274 commit 4e188dd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/std/priority_dequeue.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ pub fn PriorityDequeue(comptime T: type, comptime Context: type, comptime compar
416416
};
417417

418418
/// Return an iterator that walks the queue without consuming
419-
/// it. Invalidated if the queue is modified.
419+
/// it. The iteration order may differ from the priority order.
420+
/// Invalidated if the queue is modified.
420421
pub fn iterator(self: *Self) Iterator {
421422
return Iterator{
422423
.queue = self,

lib/std/priority_queue.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ pub fn PriorityQueue(comptime T: type, comptime Context: type, comptime compareF
231231
};
232232

233233
/// Return an iterator that walks the queue without consuming
234-
/// it. Invalidated if the heap is modified.
234+
/// it. The iteration order may differ from the priority order.
235+
/// Invalidated if the heap is modified.
235236
pub fn iterator(self: *Self) Iterator {
236237
return Iterator{
237238
.queue = self,

0 commit comments

Comments
 (0)