Added split_read() function to be able to read all commited data at once#77
Merged
jamesmunns merged 10 commits intojamesmunns:masterfrom Nov 12, 2020
Merged
Added split_read() function to be able to read all commited data at once#77jamesmunns merged 10 commits intojamesmunns:masterfrom
jamesmunns merged 10 commits intojamesmunns:masterfrom
Conversation
Collaborator
Author
|
Maybe it would be better to always return two slices instead of an |
Collaborator
Author
|
I refactored it so that it does not need the Also added some basic sanity checks. |
jamesmunns
reviewed
Nov 12, 2020
Owner
jamesmunns
left a comment
There was a problem hiding this comment.
Overall looks good, thanks for the PR! I made some comments, let me know what you think.
Co-authored-by: James Munns <james@onevariable.com>
Collaborator
Author
|
Implemented all the changed you supposed. Especially the borrow checker one was a good catch, Didn't think about that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Went ahead and implemented the idea I had in #76 myself.
There
are 3is 1 TODOs left:1/2: I wrapped the second buffer in anOption, but that means I can't easily return it asOption<&mut [u8]>orOption<&'static [u8]>(cannot move out of 'self.buf2'')3: Since I don't really understand this comment, I am not sure if this is sound the way I implemented it. I think it is, but this comment irritates me.