impl Source for IntoIterator and slices instead of Vec
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
I find the impl Source for Vec in the current version of the library ugly. It requires the list of config sources to always be a Vec, which is ugly and constraining.
I think it would be a much better idea to instead impl Source for slices and for IntoIterator.
impling it for slices would allow using static arrays as well as Vecs.
impling it for IntoIterator would make it possible to use the merge method on any Iterator of sources, without collecting into a Vec. This makes things more elegant and removes unnecessary performance overhead when working with things like glob (such as the glob example in the repo).
I think this change would make the API more elegant and would be desirable for version 1.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing impl Source for Vec and the merge API, then inspect the repository's glob example. Define the trait implementations for slices and IntoIterator so callers can use arrays, Vecs, and iterators without collecting first; done when those usage patterns compile and the relevant examples or tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100