Skip to content

Commit

Permalink
fix(bench): don't fail if dir doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
DevBlocky committed Apr 26, 2021
1 parent b9f539e commit edf073c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ criterion_group!(
);

fn main() {
std::fs::remove_dir_all("./cache").unwrap();
// delete cache directory if it exists
// this is to make sure we're benching on a clean slate
if let Ok(_) = std::fs::read_dir("./cache") {
std::fs::remove_dir_all("./cache").unwrap();
}

benches();

Expand Down

0 comments on commit edf073c

Please sign in to comment.