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 and refactor specializations tests #574

Merged
merged 2 commits into from Aug 20, 2021

Conversation

SkiFire13
Copy link
Contributor

As found in #563 specializations tests don't actually test the specialize tests due to the use of Box<dyn Iterator>. This PR fix this problem by having check_specialized be a macro so that the code inside (what used to be the) closure directly calls methods on the iterator types.

This also does a tiny refactor, moving the single test in tests/fold_specialization.rs together with the others in tests/specializations.rs.

Note that this may conflict with #563 (but I hope it doesn't since they touch different parts of the file)

@phimuemue
Copy link
Member

Awesome, I just wanted to do this myself. Thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 20, 2021

Build succeeded:

@bors bors bot merged commit d232918 into rust-itertools:master Aug 20, 2021
@SkiFire13 SkiFire13 deleted the fix-specializations-tests branch August 20, 2021 17:52
@jswrenn jswrenn added this to the next milestone Sep 13, 2021
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

3 participants