rust-ini
rust-ini copied to clipboard
Feature Request: Allow setting duplicated properties
Hello thank you for this great library, I'm currently working on a project where I need to add duplicate properties:
[foo]
bar=1
bar=2
I see that there is a get_all() for property retrieval:
ini.section("foo").unwrap()
.get_all("bar");
which would return all bar entries.
When I now try to use the setter API to add entries, it would always overwrite the entry, which is clearly documented, thanks for that.
So I have the proposal to introduce a new API that works like set but allows duplicate entries:
ini
.with_section("foo")
.add("bar", "1")
.add("bar", "2");
which would lead to my first listing.
I would like to provide a PR if that's ok for you.