Open
Description
🐛 Bug description
Using the flatten attribute from serde almost works but breaks in the case of non string values in flattened structs. In this case config always parses size as a string. However, if I put the size attribute directly in Config then everything works.
🤔 Expected Behavior
The usize value in the flattened struct should parse
👟 Steps to reproduce
#[derive(Deserialize)]
struct Config {
#[serde(flatten)]
pub subconfig: Subconfig
}
#[derive(Deserialize)]
struct Subconfig {
pub size: usize
}
🌍 Your environment
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.33.0-nightly (a8a2a887d 2018-12-16)
envy version:
latest
Metadata
Assignees
Labels
No labels