Use xshell::read_file instead of fs::read_to_string

This commit is contained in:
Igor Aleksanov 2020-10-19 20:58:32 +03:00
parent 2a20e7795c
commit aa9be4d523
4 changed files with 10 additions and 9 deletions

View file

@ -124,7 +124,7 @@ fn existing_tests(dir: &Path, ok: bool) -> Result<HashMap<String, (PathBuf, Test
let file_name = path.file_name().unwrap().to_str().unwrap();
file_name[5..file_name.len() - 3].to_string()
};
let text = fs::read_to_string(&path)?;
let text = xshell::read_file(&path)?;
let test = Test { name: name.clone(), text, ok };
if let Some(old) = res.insert(name, (path, test)) {
println!("Duplicate test: {:?}", old);