Twelf is a configuration solution for Rust including 12-Factor support. It is designed with layers in order to configure different sources and formats to build your configuration. The main goal is to be very simple using a proc macro.
It panics at assert_eq!(config.package.edition, "2000");. I would expect CLI to override the value from file. But it prints 2021 because due to #[clap(flatten)] it incorrectly merges values from clap.
Let's consider the following test:
It panics at
assert_eq!(config.package.edition, "2000");
. I would expect CLI to override the value from file. But it prints2021
because due to#[clap(flatten)]
it incorrectly merges values from clap.