Commit 4e188dd66c

Alexander Heinrich <alxhnr@users.noreply.github.com>
2023-10-11 22:20:16
Update docs of PriorityQueue.iterator() and PriorityDeque.iterator()
1 parent 1302274
lib/std/priority_dequeue.zig
@@ -416,7 +416,8 @@ pub fn PriorityDequeue(comptime T: type, comptime Context: type, comptime compar
         };
 
         /// Return an iterator that walks the queue without consuming
-        /// it. Invalidated if the queue is modified.
+        /// it. The iteration order may differ from the priority order.
+        /// Invalidated if the queue is modified.
         pub fn iterator(self: *Self) Iterator {
             return Iterator{
                 .queue = self,
lib/std/priority_queue.zig
@@ -231,7 +231,8 @@ pub fn PriorityQueue(comptime T: type, comptime Context: type, comptime compareF
         };
 
         /// Return an iterator that walks the queue without consuming
-        /// it. Invalidated if the heap is modified.
+        /// it. The iteration order may differ from the priority order.
+        /// Invalidated if the heap is modified.
         pub fn iterator(self: *Self) Iterator {
             return Iterator{
                 .queue = self,