diff --git a/crates/store/re_log_types/src/path/entity_path_filter.rs b/crates/store/re_log_types/src/path/entity_path_filter.rs index bb51e2df2b5f..40198bcce625 100644 --- a/crates/store/re_log_types/src/path/entity_path_filter.rs +++ b/crates/store/re_log_types/src/path/entity_path_filter.rs @@ -118,6 +118,7 @@ impl From for EntityPathRule { impl std::ops::Deref for EntityPathRule { type Target = str; + #[inline] fn deref(&self) -> &Self::Target { &self.0 } @@ -410,14 +411,14 @@ impl EntityPathFilter { } /// Resolve variables & parse paths, ignoring any errors. - pub fn resolve_forgiving(self, subst_env: &EntityPathSubs) -> ResolvedEntityPathFilter { + pub fn resolve_forgiving(&self, subst_env: &EntityPathSubs) -> ResolvedEntityPathFilter { let rules = self .rules - .into_iter() + .iter() .map(|(rule, effect)| { ( - ResolvedEntityPathRule::parse_forgiving(&rule, subst_env), - effect, + ResolvedEntityPathRule::parse_forgiving(rule, subst_env), + *effect, ) }) .collect(); diff --git a/crates/viewer/re_viewport_blueprint/src/viewport_blueprint.rs b/crates/viewer/re_viewport_blueprint/src/viewport_blueprint.rs index e6eac31e1fda..630eee0dde5c 100644 --- a/crates/viewer/re_viewport_blueprint/src/viewport_blueprint.rs +++ b/crates/viewer/re_viewport_blueprint/src/viewport_blueprint.rs @@ -357,7 +357,7 @@ impl ViewportBlueprint { .map(|view| { // Today this looks trivial and something like we could do during recommendation-creation. But in the future variable substitutions might become more complex! let path_subs = EntityPathSubs::new_with_origin(&view.origin); - let query_filter = view.query_filter.clone().resolve_forgiving(&path_subs); + let query_filter = view.query_filter.resolve_forgiving(&path_subs); (query_filter, view) }) .collect::>(); @@ -372,7 +372,7 @@ impl ViewportBlueprint { recommended_views.retain(|(query_filter, _)| { existing_path_filters .iter() - .all(|existing_filter| !existing_filter.is_superset_of(&query_filter)) + .all(|existing_filter| !existing_filter.is_superset_of(query_filter)) }); // Remove all views that are redundant within the remaining recommendation. @@ -385,7 +385,7 @@ impl ViewportBlueprint { .iter() .enumerate() .all(|(i, (other_query_filter, _))| { - i == *j || !other_query_filter.is_superset_of(&candidate_query_filter) + i == *j || !other_query_filter.is_superset_of(candidate_query_filter) }) }) .map(|(_, recommendation)| recommendation); diff --git a/examples/rust/dataframe_query/src/main.rs b/examples/rust/dataframe_query/src/main.rs index d451c830da93..9176d79d3789 100644 --- a/examples/rust/dataframe_query/src/main.rs +++ b/examples/rust/dataframe_query/src/main.rs @@ -4,7 +4,7 @@ use itertools::Itertools; use rerun::{ dataframe::{ - concatenate_record_batches, EntityPathFilter, QueryEngine, QueryExpression, + concatenate_record_batches, EntityPathFilter, EntityPathSubs, QueryEngine, QueryExpression, SparseFillStrategy, Timeline, }, ChunkStoreConfig, StoreKind, VersionPolicy, @@ -57,7 +57,9 @@ fn main() -> Result<(), Box> { filtered_index: Some(timeline), view_contents: Some( engine - .iter_entity_paths_sorted(&entity_path_filter) + .iter_entity_paths_sorted( + entity_path_filter.resolve_forgiving(&EntityPathSubs::empty()), + ) .map(|entity_path| (entity_path, None)) .collect(), ),