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

std.array_list: fix assertion error with zero-sized types #22715

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sb2bg
Copy link

@sb2bg sb2bg commented Feb 1, 2025

Resolves #22483.

Fixes an assertion error caused by calling ArrayList.toOwnedSlice() with a zero-sized type. Since zero-sized types require no memory allocation, we can short-circuit the resize operation for them. For more details, see #22483.

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.

ArrayList.toOwnedSlice assertion error with zero-sized types
1 participant