-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I took a look at the API of the RingBuffer trait and I have some suggestions for cleanup before 1.0. Happy to make a PR for whatever subset of these changes you want (except the second one, I'd need to investigate that with one of you to fully figure that out):
- Swap
pushandenqueue. Sincedequeueis a required method onRingBuffer, is makes sense thatenqueuewould be the required method andpushthe provided one. -
lenbeing provided is a bit confusing, because there's no way it can be derived from the required methods, at least not from the methods that show up in the docs. Something you might consider is splittingRingBufferfromUnsafeRingBufferor something and "hide" methods that way, while still making it possible to see what's going on in the docs. Ideally though, theptr_*methods would only be an implementation detail and should maybe not be part of the trait. -
get_signedcan probably be a provided method, based on length andget. -
skipseems like it could be removed, because the drop can be done manually.
Jasha10
Metadata
Metadata
Assignees
Labels
No labels