rust-cli / rust-cli/config-rs

Idea: Ability to decode a sequence from single thing

Open
#120 0 comments 5 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.