Skip to content

Document the depth-first pre-order of ReportIter as a guarantee - #194

Merged
TethysSvensson merged 1 commit into
mainfrom
tethys/document-iteration-order
Jul 4, 2026
Merged

Document the depth-first pre-order of ReportIter as a guarantee#194
TethysSvensson merged 1 commit into
mainfrom
tethys/document-iteration-order

Conversation

@TethysSvensson

Copy link
Copy Markdown
Contributor

The iteration order of ReportIter was described informally at each entry point but never stated as a contract. This PR makes depth-first pre-order an explicit guarantee, documented once on ReportIter with an order-asserting example on a branching tree, and thins the iter_reports/iter_sub_reports/iter_downcast_context docs to reference it (per the revised style guide's push-shared-explanation-up rule).

Users writing first-match searches (e.g. iter_downcast_context::<D>().next()) can now rely on the order.

@TethysSvensson
TethysSvensson enabled auto-merge July 4, 2026 07:34
@TethysSvensson
TethysSvensson added this pull request to the merge queue Jul 4, 2026
Merged via the queue into main with commit 388985e Jul 4, 2026
16 checks passed
@TethysSvensson
TethysSvensson deleted the tethys/document-iteration-order branch July 4, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant