config-rs
config-rs copied to clipboard
Vector fields are overwritten instead of merged
Consider the following config.
struct Conf {
nums: Vec<i32>
}
This is built and given two config files.
# a.yml
nums:
- 1
- 2
# b.yml
nums:
- 3
- 4
The output of this configuration is that nums has only [3, 4]. Vectors should be merged, and nums should contain [1, 2, 3, 4].
Hi,
thanks for your report. I don't think lists should be merged necessarily, but I see that in some instances, users might want to merge lists.
If not the predominant default behaviour, at least an option or workaround to merge lists would be great to have. Thanks for considering this.