Skip to content

fix: handle empty swap list edge case in group_swaps#351

Open
fannotastdi wants to merge 3 commits into
propeller-heads:mainfrom
fannotastdi:fix/encoder-edge-case
Open

fix: handle empty swap list edge case in group_swaps#351
fannotastdi wants to merge 3 commits into
propeller-heads:mainfrom
fannotastdi:fix/encoder-edge-case

Conversation

@fannotastdi

Copy link
Copy Markdown

group_swaps currently iterates through the full swap grouping logic even when called with an empty slice. This adds an early return to avoid unnecessary allocations and makes the behavior explicit.

Found while tracing a panic in a downstream integration test where an empty Solution.swaps was passed through the encoder pipeline.

Add early return for empty input to avoid unnecessary allocations.
Also add build script for version metadata generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant