Skip to content

Commit 4c1e237

Browse files
committed
collector: beautify warning when include\exclude filters wrong
1 parent d44f51b commit 4c1e237

File tree

1 file changed

+5
-3
lines changed
  • collector/src/compile/benchmark

1 file changed

+5
-3
lines changed

collector/src/compile/benchmark/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ pub fn get_compile_benchmarks(
475475
let mut excludes = to_hashmap(exclude);
476476
let mut exclude_suffixes = to_hashmap(exclude_suffix);
477477

478-
for (path, name) in paths {
478+
for (path, name) in paths.clone() {
479479
let mut skip = false;
480480

481481
let name_matches_prefix = |prefixes: &mut HashMap<&str, usize>| {
@@ -508,9 +508,11 @@ pub fn get_compile_benchmarks(
508508
.collect();
509509
if !unused.is_empty() {
510510
bail!(
511-
"Warning: one or more unused --{} entries: {:?}",
511+
r#"Warning: one or more unused --{} entries: {:?} found.
512+
Expected zero or more entries or substrings from list: {:?}."#,
512513
option,
513-
unused
514+
unused,
515+
&paths.iter().map(|(_, name)| name).collect::<Vec<_>>(),
514516
);
515517
}
516518
}

0 commit comments

Comments
 (0)