Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strengthen validation for sections&segments in compute_segment_layout #94

Conversation

marxin
Copy link
Collaborator

@marxin marxin commented Aug 30, 2024

It would be rather nice to propagate an error (with ensure macro), but the callback used in sections_and_segments_do returns the unit type :/

@marxin marxin force-pushed the strenghten-validation-in-compute_segment_layout branch from 741e349 to 174c819 Compare August 30, 2024 14:04
@davidlattimore
Copy link
Owner

but the callback used in sections_and_segments_do returns the unit type :/

We could replace sections_and_segments_do with a Vec<OrderEvent> on OutputSections. Then code that currently calls sections_and_segments_do could iterate over the events however they liked, including returning errors.

@davidlattimore davidlattimore merged commit 0dbb766 into davidlattimore:main Aug 30, 2024
3 checks passed
@marxin marxin deleted the strenghten-validation-in-compute_segment_layout branch September 1, 2024 18:26
@marxin
Copy link
Collaborator Author

marxin commented Sep 2, 2024

Sure, done in #95.

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.

None yet

2 participants