aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-core/tests/indent.rs4
-rw-r--r--helix-view/src/theme.rs6
2 files changed, 4 insertions, 6 deletions
diff --git a/helix-core/tests/indent.rs b/helix-core/tests/indent.rs
index e1114f4a..f74b576a 100644
--- a/helix-core/tests/indent.rs
+++ b/helix-core/tests/indent.rs
@@ -28,8 +28,8 @@ fn test_treesitter_indent(file_name: &str, lang_scope: &str) {
let mut config_file = test_dir;
config_file.push("languages.toml");
- let config = std::fs::read(config_file).unwrap();
- let config = toml::from_slice(&config).unwrap();
+ let config = std::fs::read_to_string(config_file).unwrap();
+ let config = toml::from_str(&config).unwrap();
let loader = Loader::new(config);
// set runtime path so we can find the queries
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!(