config-rs
config-rs copied to clipboard
Idea: Ability to decode a sequence from single thing
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.