diff options
author | Michael Davis | 2023-01-24 17:11:07 +0000 |
---|---|---|
committer | Michael Davis | 2023-01-24 18:50:46 +0000 |
commit | b3e9f6233a64bb08dcb87788d5ca54dd25f13a27 (patch) | |
tree | a28e80772a0a3b29ff142f7b795fe196a9139107 /helix-view/src | |
parent | 52d854fa62e58909d5abb803bdf225b2a5069a4e (diff) |
Fix compatibility with toml 0.6.0
`toml::from_slice` has been removed. The CHANGELOG recommends using
`toml::from_str` instead and doing the byte-to-str conversion yourself.
The `toml::toml!` macro has also changed to return the type of the
value declared within the macro body. In the change in
`helix-view/src/theme.rs` this is a `toml::map::Map` (it was a
`toml::Value` previously) allowing us to skip the match and use the
map directly.
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/theme.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index 9eae88a8..ead0b9fb 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -517,10 +517,8 @@ mod tests { let mut style = Style::default(); let palette = ThemePalette::default(); - if let Value::Table(entries) = table { - for (_name, value) in entries { - palette.parse_style(&mut style, value).unwrap(); - } + for (_name, value) in table { + palette.parse_style(&mut style, value).unwrap(); } assert_eq!( |