aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove un-needed feature gate.Brian Cully2019-08-141-7/+6
| | | | This should work on stable now.
* Relax ordering and use fences where necessary.Brian Cully2019-08-141-15/+29
|
* Remove `Copy` requirement for most methods.Brian Cully2019-08-141-23/+54
| | | | | | | | | The ring buffer will now take and pass ownership as required, so the `Copy` trait constraint is no longer required. The one exception is `Writer::unshift_from`, where we're taking data we don't know how to replace from an arbitrary slice, so that needs to be `Copy`-able.
* API Change: Don't require default value for RingBuffer::new().Brian Cully2019-08-141-22/+31
| | | | | | | | Use mem::MaybeUninit as the backing store so initialization is no longer required in `new`. This is safe, because you can't read anything out of the ring buffer until you store something, which initializes the memory.
* Add Writer::unshift_from for batch copying data in.Brian Cully2019-08-131-0/+52
| | | | | This is just the inverse of Reader::shift and exists for the same reasons.
* Add Reader::shift_into function for batch copying.Brian Cully2019-08-131-3/+67
| | | | | | This function can be used if you need to quickly copy a bunch of things from the buffer, as it only does its safety checks once, rather than on every item extraction.
* Documentation.Brian Cully2019-08-131-0/+19
|
* Add iterator implementation.Brian Cully2019-08-131-4/+28
|
* Use get_unchecked for backing array access.Brian Cully2019-08-131-4/+8
| | | | | The index is guaranteed to be in bounds because it's always modulo the array capacity, so use the unchecked variants to get/set values.
* Initial commit.v0.1.0Brian Cully2019-08-041-0/+221