Skip to content

Commit 8804f41

Browse files
committed
make sure exclude-suffixes are all used
1 parent d42470d commit 8804f41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

collector/src/benchmark/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,10 @@ pub fn get_compile_benchmarks(
432432
benchmarks.push(Benchmark::new(name, path)?);
433433
}
434434

435-
// All prefixes must be used at least once. This is to catch typos.
436-
let check_for_unused = |option, prefixes: Option<HashMap<&str, usize>>| {
437-
if let Some(prefixes) = prefixes {
438-
let unused: Vec<_> = prefixes
435+
// All prefixes/suffixes must be used at least once. This is to catch typos.
436+
let check_for_unused = |option, substrings: Option<HashMap<&str, usize>>| {
437+
if let Some(substrings) = substrings {
438+
let unused: Vec<_> = substrings
439439
.into_iter()
440440
.filter_map(|(i, n)| if n == 0 { Some(i) } else { None })
441441
.collect();
@@ -452,6 +452,7 @@ pub fn get_compile_benchmarks(
452452

453453
check_for_unused("include", includes)?;
454454
check_for_unused("exclude", excludes)?;
455+
check_for_unused("exclude-suffix", exclude_suffixes)?;
455456

456457
benchmarks.sort_by_key(|benchmark| benchmark.name.clone());
457458

0 commit comments

Comments
 (0)