Use xshell::read_file instead of fs::read_to_string
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user