spsc-bip-buffer icon indicating copy to clipboard operation
spsc-bip-buffer copied to clipboard

Make the BipBuffer generic over the stored type

Open MatthieuDartiailh opened this issue 1 year ago • 4 comments

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)
  • Send and Sync: this I am not completely sure but I think they are needed to make things well behaved

When creating a buffer from a length the type needs to implement Default and Clone.

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.

MatthieuDartiailh avatar Sep 24 '24 16:09 MatthieuDartiailh

Travis did not trigger on this PR is it normal ?

MatthieuDartiailh avatar Sep 25 '24 13:09 MatthieuDartiailh

Hi @MatthieuDartiailh! Thanks for the PR, I'll take a look as soon as I can, but it may take a few days.

utaal avatar Sep 25 '24 13:09 utaal

Friendly ping @utaal

MatthieuDartiailh avatar Oct 08 '24 16:10 MatthieuDartiailh

Friendly ping @utaal

MatthieuDartiailh avatar Oct 28 '24 12:10 MatthieuDartiailh