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

Always check iterator size when allocating #1394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThomasdenH
Copy link

Fixes #1391.

Allocation now checks whether the supplied iterator has the correct size. Because checking this size messes with the zero-cost conversion of a Vec to a Matrix, I have also added a method allocate_from_vec to the Allocator trait with a default implementation. I am not sure if this will be useful in general. Alternatively this could also just be a private method of DefaultAllocator instead.

@Andlon Andlon added the breaking change Fixing this issue, or merging this pull-request is likely to require breaking changes label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Fixing this issue, or merging this pull-request is likely to require breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

from_iter implementation may run indefinitely
2 participants