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

Fix bounds generation for generics in derive(Arbitrary) #511

Merged

Conversation

matthew-russo
Copy link
Member

The implementation of UseTracker expects that iteration over items of used_map gives items in insertion order. However, the order of BTreeSet is based on Ord, not insertion.

I use a Vec of tuples. An alternative would be indexmap crate, but since the maps are supposed to be very small, it is probably not worthy. There already was a mention about the crate in the comments worrying about compile times.

replaces #260

The implementation of UseTracker expects that iteration over items of
used_map gives items in insertion order. However, the order of BTreeSet
is based on Ord, not insertion.

I use a Vec of tuples. An alternative would be indexmap crate, but since
the maps are supposed to be very small, it is probably not worthy. There
already was a mention about the crate in the comments worrying about
compile times.
@rexmas rexmas closed this Sep 23, 2024
@rexmas rexmas reopened this Sep 23, 2024
Copy link
Contributor

@rexmas rexmas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice find 👍

@matthew-russo matthew-russo merged commit 6962d3f into proptest-rs:main Sep 23, 2024
6 checks passed
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.

3 participants