Idea: Ability to decode a sequence from single thing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
Hello
I was wondering if it would be more user friendly to be able to accept a single value in config where the structure expects a sequence. In other words, if I wanted config like this:
#[derive(Deserialize)]
struct Cfg {
stuff: Vec<String>,
}
would it make sense to deserialize single-value vector from this yaml config?
stuff: Hello
config already gives some leeway in what it accepts in terms of key-name case, types, etc, presumably for user convenience.
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
No file, test, or entry point is named. Start by locating the Rust deserialization path for a Vec field and examine how the YAML example is handled; done means agreeing on and testing whether a scalar such as "Hello" should be accepted as a single-element sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100