-
Notifications
You must be signed in to change notification settings - Fork 321
Fix #657 #683
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 #657 #683
Conversation
tests/test_std.rs
Outdated
for (i, chunk) in grouper_clone.into_iter().enumerate() { | ||
match i { | ||
0 => it::assert_equal(chunk, &[0, 0, 0]), | ||
1 => it::assert_equal(chunk, &[1, 1, 0]), | ||
2 => it::assert_equal(chunk, &[0, 2, 2]), | ||
3 => it::assert_equal(chunk, &[3, 3]), | ||
_ => unreachable!(), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid the duplication here with the above code block, and make it more explicit that you're testing that these produce the same output.
You can achieve this by doing something like:
for (i, (chunk, cloned_chunk)) in grouper.into_iter(grouper_clone).zip().enumerate() {
assert_eq!(chunk, cloned_chunk);
match i { /* the match branches */ }
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in d608283
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
This fix seemed very simple. Maybe I'm missing something?
Fixes #657.