-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement DequeView on top of #486 #490
Conversation
ceb0cc5
to
7465a2c
Compare
7465a2c
to
3ad17af
Compare
The const len/capacity thing is unfortunate. I guess we can live with it for 0.8.x then clean it up for 0.9 which should be soon anyway (for example i'd like to make all per-container mods public and remove all the reexports at the crate root. the docs are getting hard to read with everything mixed up). |
Oh, that's right for the iterators! I would go even further and return directly |
Should I create a issue to track breaking changes for the future 0.9 release? |
perhaps that's a bit too far? we'd be leaking the details on how it's implemented, so we can't change it later if we find it doesn't work for some reason (can't think of why that'd be, but you never know...). an alternative is RPIT but then the user can't name the iterator. this'd be the perfect use case for TAIT when it's stable... for now I think a wrapper struct is best even if it's a bit verbose.
why not, that'd be great! |
8c407ed
to
a9e9cc9
Compare
a9e9cc9
to
235f794
Compare
Efforts have been made to avoid breaking changes:
capacity
andlen
wereconst
, they have been kept onDeque
, and the generic version onDequeInner
are prefixed bystorage
and are notconst
Iter<'a, T, const N: usize>
is kept, and a newIterView
type is added with conversions to and from both iter types. (I also simplified significantly the implementation of theIterator
, by using the standard library's iterator combinators).By accepting a backward incompatible change, these APIs could be made more intuitive.