Updated settings::utils::write_file’s signature for more flexibility

`write_file` now accepts as its second argument any type that
implements the `ToString` trait so that not only Strings will be
accepted but any type that can be turned into one.
This commit is contained in:
2020-03-27 19:09:34 +01:00
parent 488ceba1bb
commit 8642067eb3
2 changed files with 6 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ fn write_settings() {
version: "1"
categories: []
rules: []"#;
utils::write_file(&path, serde_yaml::to_string(&s).unwrap()).unwrap();
utils::write_file(&path, &serde_yaml::to_string(&s).unwrap()).unwrap();
assert_eq!(settings, utils::read_file(&path).unwrap());
}