linebender / linebender/druid

Redesign `druid::widget::ListIter` trait?

Open
#1,644 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Currently this trait is not very efficient when you want to implement `ListIter<(K, V)>` on `OrdMap` or `HashMap`, as you have to [clone](https://github.com/linebender/druid/pull/1033/files#diff-0bb03eb637d659cef6bf00945fc260762de7365f068a308ee92a633fc2cc4f0bR130) the keys and values each time you call the callback `cb`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the druid::widget::ListIter trait and the linked PR 1033 implementation. Compare how OrdMap and HashMap would use the callback cb, focusing on the per-callback cloning described in the issue. Done means a trait design that avoids those repeated key and value clones for these implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.