Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
keithtensor committed Oct 17, 2024
1 parent fdd07d5 commit ba4ed6f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions support/code-coverage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ pub fn analyze_files(rust_files: &[PathBuf], workspace_root: &Path) -> Vec<Palle
.collect::<HashSet<_>>();

custom_println!("[code-coverage]", green, "found {} tests", tests.len());
custom_println!("[code-coverage]", green, "found {} benchmarks", benchmarks.len());
custom_println!(
"[code-coverage]",
green,
"found {} benchmarks",
benchmarks.len()
);

custom_println!(
"[code-coverage]",
Expand Down Expand Up @@ -254,20 +259,18 @@ pub fn find_benchmarks(rust_files: &[PathBuf]) -> Vec<BenchmarkInfo> {
let Ok(file) = syn::parse_file(&content) else {
return Vec::new();
};
let mut visitor = BenchmarkVisitor { benchmarks: Vec::new() };
let mut visitor = BenchmarkVisitor {
benchmarks: Vec::new(),
};
visitor.visit_file(&file);
visitor
.benchmarks
.into_iter()
.map(|f| {
let mut calls = HashSet::new();
let mut visitor = CallVisitor {
calls: &mut calls,
};
let mut visitor = CallVisitor { calls: &mut calls };
visitor.visit_item_fn(&f);
BenchmarkInfo {
calls,
}
BenchmarkInfo { calls }
})
.collect()
})
Expand Down

0 comments on commit ba4ed6f

Please sign in to comment.