Make the BipBuffer generic over the stored type#12
Open
MatthieuDartiailh wants to merge 2 commits intoutaal:masterfrom
Open
Make the BipBuffer generic over the stored type#12MatthieuDartiailh wants to merge 2 commits intoutaal:masterfrom
MatthieuDartiailh wants to merge 2 commits intoutaal:masterfrom
Conversation
The type needs to be Sized. It is also required to be Send and Sync for the time being. To create a bip buffer from a length we also require Default and Clone.
Author
|
Travis did not trigger on this PR is it normal ? |
Owner
|
Hi @MatthieuDartiailh! Thanks for the PR, I'll take a look as soon as I can, but it may take a few days. |
Author
|
Friendly ping @utaal |
1 similar comment
Author
|
Friendly ping @utaal |
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.
Closes #11
Let me be honest, it is my first contribution to a Rust project so I may have gotten a bunch of things wrong.
To make the BipBuffer generic I added a generic parameter that needs to be:
Sized(I don't see how this could work for unsized types)SendandSync: this I am not completely sure but I think they are needed to make things well behavedWhen creating a buffer from a length the type needs to implement
DefaultandClone.All tests compile unmodified and I duplicated them all to run on u64. It may make sense to add a dependency on rstest to avoid duplicating everything.
I did not touch the docs but I will do it after a first round of review.