bal-e / bufferring

A flexible and performant crate for ring buffers.
MIT License
0 stars 0 forks source link

MaskingRingBuffer v1 #1

Closed tertsdiepraam closed 1 year ago

tertsdiepraam commented 1 year ago

rustfmt changes are in a separate commit.

Currently, the only storage type that works is [MaybeUninit<T>, 4] because I wanted to focus on the ringbuffer, not implementing PartialStorage. I definitely made some mistakes with unsafe, so please check carefully and roast appropriately.

bal-e commented 1 year ago

Before I properly review the code, could you rewrite in terms of the newly-added ArrayStorage type? It should simplify the MaskingBuffer generics as well.

tertsdiepraam commented 1 year ago

Before I properly review the code, could you rewrite in terms of the newly-added ArrayStorage type? It should simplify the MaskingBuffer generics as well.

Done!

bal-e commented 1 year ago

Alright, I think everything's good! Thanks for contributing!