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

Update par_azip!() syntax to match azip!() #722

Merged
merged 3 commits into from
Sep 20, 2019
Merged

Update par_azip!() syntax to match azip!() #722

merged 3 commits into from
Sep 20, 2019

Conversation

bluss
Copy link
Member

@bluss bluss commented Sep 20, 2019

Update the syntax to match. First refactor azip!() slightly, so that we can reuse it wholesale from par_azip.

cc #670
cc #721

This makes the apply method a parameter (so that par_azip can reuse
azip, in the next commit).
};
// Build Finish Rule (both)
(@finish ($z:expr) [$($aa:expr,)*] [$($p:pat,)+] in { $($t:tt)*}) => {
use $crate::parallel::prelude::*;
Copy link
Member Author

Choose a reason for hiding this comment

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

Didn't notice it before, but par_apply is an inherent method nowadays and no trait use is needed.

We simplify the duplication in par_azip a lot, since we can now just
reuse `azip`'s internal rule and pass it the name of the finisher
method, which is `par_apply`.
Copy link
Member

@jturner314 jturner314 left a comment

Choose a reason for hiding this comment

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

This looks good to me; good catch on updating this before releasing 0.13.0. I like the way you handled the optional trailing comma; I've never thought to do it that way before.

@bluss bluss merged commit 5ab292d into master Sep 20, 2019
@bluss bluss deleted the update-par-azip branch September 20, 2019 23:32
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.

2 participants