mum-rs / mum

Daemon/cli mumble client
MIT License
31 stars 2 forks source link

toml-edit #145

Closed sornas closed 2 years ago

sornas commented 2 years ago

Instead of modifying the deserialized config and always writing it back, we

1) Only write the file if a mumctl-command actually wanted to change a config value 2) Use toml-edit which is a crate for actually modifying toml files, meaning it a) doesn't remove unknown values b) is better at keeping the order of the

We also make it more difficult to accidentaly make the config handling inconsistent. Multiple times, my values were removed because I forgot to change https://github.com/mum-rs/mum/compare/toml-edit#diff-4b459f0afe9585a8d24518e27aae2513984baac990d373897ad4c117206deb38L161.

We also remove the duplicate Config/TOMLConfig struct.