-
Notifications
You must be signed in to change notification settings - Fork 568
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
Redesign druid::widget::ListIter
trait?
#1644
Comments
I did find this implementation which only implements |
What was the implementation you found? |
Anything that is part of your I do agree that these types should be extensively reworked or replaced, but I don't think that the cloning, on its own, would be sufficient rationale. :) |
I'm not sure how to link directly to PR comments, but it's worth considering why it doesn't already implement In the comments on druid/src/widget/list.rs |
A closely related thing is this choice: https://github.com/linebender/druid/blob/c02452ddeebc527992e8f112f434f23ce24c934d/druid/src/widget/list.rs#LL129C3-L129C33 - the projection through OrdMap<K,V> only passes V to the interior widget. e.g. for some OrdMap<String,String>
Now the reason this is a nuisance is that things like toml files that deserialise collections won't include the collection K inside the V, forcing postprocessing after serde to put the data into a form accessible to druid. |
Currently this trait is not very efficient when you want to implement
ListIter<(K, V)>
onOrdMap<K, V>
orHashMap<K, V>
, as you have to clone the keys and values each time you call the callbackcb
.The text was updated successfully, but these errors were encountered: