-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
feat: Impl Iterator::size_hint()
for Dictionary
(Closes: #560).
#583
Conversation
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-583 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, also for the tests! 🙂
68195ad
to
693a58a
Compare
An issue with indexes is that it's possible (although unlikely) that an element is added/removed while iterating (through a cloned dictionary). This problem also affects the size though.
Maybe you can see if this can be reproduced in a separate itest? Clone dictionary, start iterating, add/remove key in the copy... |
693a58a
to
4b513e4
Compare
The test is a good way to see that |
1fff44c
to
73ca8d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! One small thing remaining 🙂
…st#560). The following `Dictionary` `Iters` now implement `Iterator::size_hint()`: - `DictionaryIter` (base for all others) - `Iter<'a>` - `Keys<'a>` - `TypedIter<'a, K, V>` - `TypedKeys<'a, K>`
73ca8d5
to
c16bb6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
The following
Dictionary
Iters
now implementIterator::size_hint()
:DictionaryIter
(base for all others)Iter<'a>
Keys<'a>
TypedIter<'a, K, V>
TypedKeys<'a, K>