Skip to content

Commit

Permalink
Fix proc_macro_coverage_hack ".rs" file filter
Browse files Browse the repository at this point in the history
  • Loading branch information
kellerkindt committed Dec 8, 2021
1 parent 30dfd73 commit 1319241
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/proc_macro_coverage_hack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ fn walk_dir(path: PathBuf) {
Ok(entry) if entry.file_type().unwrap().is_dir() => {
walk_dir(entry.path());
}
Ok(entry) if entry.file_type().unwrap().is_file() && entry.path().ends_with(".rs") => {
Ok(entry)
if entry.file_type().unwrap().is_file()
&& entry.path().to_str().map_or(false, |s| s.ends_with(".rs")) =>
{
println!("Feeding {:?}", entry.path());
let file = fs::File::open(entry.path()).unwrap();
emulate_macro_expansion_fallible(file);
Expand Down

0 comments on commit 1319241

Please sign in to comment.