mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
Only read rust test files
This commit is contained in:
@@ -928,7 +928,9 @@ fn dir_handling(dir: &Path) -> Result<(), String> {
|
||||
}
|
||||
fn file_handling(file: &Path) -> Result<(), String> {
|
||||
let path_str = file.display().to_string().replace("\\", "/");
|
||||
if should_not_remove_test(&path_str) {
|
||||
if !path_str.ends_with(".rs") {
|
||||
return Ok(())
|
||||
} else if should_not_remove_test(&path_str) {
|
||||
return Ok(());
|
||||
} else if should_remove_test(file, &path_str) {
|
||||
return std::fs::remove_file(file)
|
||||
|
||||
Reference in New Issue
Block a user