Lucien Cartier-Tilet
18eb16e777
Encoding and decoding of `settings::Settings` now handled in macros to avoid code repetition. I also wish rewrite them both in a combined macro that would either encode or decode the struct depending on how it was called. Replaced some log warnings with errors Now if type extension is not valid, the code will still attempt to decode it, first as JSON data, then as Yaml data. If both fail, then an error is returned. For this, I added the Display trait to the `settings::Settings` struct which allows the FromStr trait, and due to conflicting implementation, I removed the From trait and implemented manually the `from` method with the same signature -- the struct just lacks the trait that comes with it. |
||
---|---|---|
src | ||
.gitignore | ||
Cargo.toml |