| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
This should work on stable now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is just the inverse of Reader::shift and exists for the same
reasons.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* Add more documentation.
* Add `Iterator` implementation.
* Optimize indexing by using unchecked variants.
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|