-
Notifications
You must be signed in to change notification settings - Fork 1
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
implementing padding #3
Conversation
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.
Much better, still some work to do. Feel free to just push commits onto your existing branch
Applied changes including: Inlining the generation of random bytes Avoiding panic on .take() Working directly on the slice Using with_capacity Improved readability with constants for future updates if needed.
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.
Looks almost good, just two minor things (really one in two places) and then we're ready to merge!
Improve the readability of the code by implementing the constant variables more consistently.
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.
LGTM!
Reviewed-by: Amy Parker amy@amyip.net
This patch implements the random padding surrounding the BSON packet. The one included unit test ensures a proper wrapping and unwrapping of our packet. Future needs may warrant further unit testing for invalid data.
Signed-off-by: Owen De Vita owen.n.devita@gmail.com