From 660c0652445f0c552307b7ef577dc230f10fe7ca Mon Sep 17 00:00:00 2001 From: David Pearce Date: Wed, 23 Oct 2024 02:45:15 +1300 Subject: [PATCH] feat: support filtering of perspectives (#281) This enables filtering to include the perspective as part of the filter. In essence, the change is that the filter regex now runs over the full column name (including perspective and module) rather than just the name. --- src/inspect/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/inspect/mod.rs b/src/inspect/mod.rs index 3c411e8..6f802a6 100644 --- a/src/inspect/mod.rs +++ b/src/inspect/mod.rs @@ -124,12 +124,11 @@ impl ModuleView { .iter() .enumerate() .filter_map(|(i, (_, handle))| { - if self.regexps.is_empty() - || self - .regexps + if self.regexps.is_empty() || { + self.regexps .iter() - .any(|regex| regex.is_match(&handle.name)) - { + .any(|regex| regex.is_match(&handle.to_string())) + } { Some(i) } else { None