QEDK / configparser-rs

A simple configuration parsing utility with no dependencies built on Rust.
https://crates.io/crates/configparser
Other
66 stars 21 forks source link

Non exhaustive IniDefault #22

Closed vthib closed 3 years ago

vthib commented 3 years ago

Mark the IniDefault struct as non exhaustive, as discussed here: https://github.com/QEDK/configparser-rs/issues/19#issuecomment-941020519 The default values used in Ini::new and Ini::new_cs are moved inside IniDefault::default(), otherwise the workflow to create a new IniDefault and update a few values in it is quite cumbersome.

QEDK commented 3 years ago

This is great! Removes a lot of code duplication which I've always wanted to come to.

QEDK commented 3 years ago

@vthib can you rebase this on top of the current master, ty