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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user