mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Use xshell::read_file instead of fs::read_to_string
This commit is contained in:
parent
2a20e7795c
commit
aa9be4d523
4 changed files with 10 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue