aboutsummaryrefslogtreecommitdiff
path: root/.ignore
diff options
context:
space:
mode:
authorMichael Davis2023-01-24 17:07:46 +0000
committerMichael Davis2023-01-24 18:50:46 +0000
commit70887b7378d642226ad5102fbe601fecb225225c (patch)
tree2de7f9847388e8961e6228b07aa8e5a6d71e4bea /.ignore
parentb3e9f6233a64bb08dcb87788d5ca54dd25f13a27 (diff)
Refactor toml::Value->Theme conversion
The `From<Value>` implementation for `Theme` converted the Value to a string and re-parsed the string to convert it to `HashMap<String, Value>` which feels a bit wasteful. This change uses the underlying `toml::map::Map` directly when the value is a table and warns about the unexpected `Value` shape otherwise. This is necessary because toml 0.6.0 changes the Display implementation for Value::Table so that the `to_string` no longer encodes the value as a Document, just a Value. So the parse of the Value fails to be decoded as a HashMap. The behavior for returning `Default::default` matches the previous code's behavior except that it did not warn when the input Value was failed to parse.
Diffstat (limited to '.ignore')
0 files changed, 0 insertions, 0 deletions