aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/themelint.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-01-24 16:07:01 +0000
committerGitHub2023-01-24 16:07:01 +0000
commite9dc9f493554bd54ea3710e66a2fb0fd2e70b462 (patch)
tree0b862501d0f5613a3c8dfe47789219ad985e0440 /xtask/src/themelint.rs
parent64ec0256d3e41d6b6e5a24f749489880a147ab8a (diff)
Switch from toml::from_slice to toml::from_str (#5659)
Diffstat (limited to 'xtask/src/themelint.rs')
-rw-r--r--xtask/src/themelint.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/themelint.rs b/xtask/src/themelint.rs
index 06dfae40..e9980574 100644
--- a/xtask/src/themelint.rs
+++ b/xtask/src/themelint.rs
@@ -156,8 +156,8 @@ pub fn lint(file: String) -> Result<(), DynError> {
return Ok(());
}
let path = path::themes().join(file.clone() + ".toml");
- let theme = std::fs::read(&path).unwrap();
- let theme: Theme = toml::from_slice(&theme).expect("Failed to parse theme");
+ let theme = std::fs::read_to_string(&path).unwrap();
+ let theme: Theme = toml::from_str(&theme).expect("Failed to parse theme");
let mut messages: Vec<String> = vec![];
get_rules().iter().for_each(|lint| match lint {