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

refactor to pass slice &[u8] around and not &Vec<u8> #498

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Aug 2, 2020

  • refactor to pass slice &[u8] around and not &Vec<u8>
  • cleaned up a couple of unwrap() calls in check_header() and check_footer()

It is more idiomatic in rust to pass a slice into a fn.
This ends up cleaning up some of the surrounding code as the fn is a little more flexible this way.

I noticed this when reviewing the proposed slatepack size checks in #495.

cleaned up a couple of unwrap() calls
Copy link
Member

@yeastplume yeastplume left a comment

Choose a reason for hiding this comment

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

👍

@yeastplume yeastplume merged commit e00c61f into mimblewimble:master Aug 3, 2020
antiochp added a commit to antiochp/grin-wallet that referenced this pull request Aug 7, 2020
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