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

use AsRef in cut_through for flexibility #3411

Merged
merged 1 commit into from
Aug 1, 2020

Conversation

antiochp
Copy link
Member

Make cut_through() more idiomatic, making it significantly more flexible in terms of what we can do with it.
It now takes two slices of anything that is AsRef<Commitment>.
So we can cut_through inputs and outputs.
We can also cut_through inputs and output identifiers.
We could also (if we wanted) cut_through inputs and inputs, finding the intersection and difference in the process.

Also took the opportunity to refactor finding the total len() of all inputs, outputs, kernels in aggregate() using fold() to remove some mut definitions.

and use fold() to get len of inputs, outputs, kernels
@antiochp antiochp merged commit 880f9ad into mimblewimble:master Aug 1, 2020
@antiochp antiochp deleted the cut_through_as_ref branch August 1, 2020 14:19
@antiochp antiochp mentioned this pull request Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant