From 4207637bbed6f1d10a72c4876090bf6b9bb3d5ea Mon Sep 17 00:00:00 2001 From: Antoine Beyeler Date: Fri, 27 Sep 2024 15:24:33 +0200 Subject: [PATCH] add ctor to `datatypes::ComponentColumnSelector` --- .../components/component_column_selector_ext.rs | 7 ++----- .../datatypes/component_column_selector_ext.rs | 12 ++++++++++++ crates/store/re_types/src/blueprint/datatypes/mod.rs | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 crates/store/re_types/src/blueprint/datatypes/component_column_selector_ext.rs diff --git a/crates/store/re_types/src/blueprint/components/component_column_selector_ext.rs b/crates/store/re_types/src/blueprint/components/component_column_selector_ext.rs index a38aecde55f79..18957e74b779a 100644 --- a/crates/store/re_types/src/blueprint/components/component_column_selector_ext.rs +++ b/crates/store/re_types/src/blueprint/components/component_column_selector_ext.rs @@ -4,10 +4,7 @@ use re_types_core::ComponentName; impl super::ComponentColumnSelector { /// Create a [`Self`] from an [`EntityPath`] and a [`ComponentName`]. pub fn new(entity_path: &EntityPath, component_name: ComponentName) -> Self { - crate::blueprint::datatypes::ComponentColumnSelector { - entity_path: entity_path.into(), - component: component_name.as_str().into(), - } - .into() + crate::blueprint::datatypes::ComponentColumnSelector::new(entity_path, component_name) + .into() } } diff --git a/crates/store/re_types/src/blueprint/datatypes/component_column_selector_ext.rs b/crates/store/re_types/src/blueprint/datatypes/component_column_selector_ext.rs new file mode 100644 index 0000000000000..ca74f5fc2a045 --- /dev/null +++ b/crates/store/re_types/src/blueprint/datatypes/component_column_selector_ext.rs @@ -0,0 +1,12 @@ +use re_log_types::EntityPath; +use re_types_core::ComponentName; + +impl super::ComponentColumnSelector { + /// Create a [`Self`] from an [`EntityPath`] and a [`ComponentName`]. + pub fn new(entity_path: &EntityPath, component_name: ComponentName) -> Self { + Self { + entity_path: entity_path.into(), + component: component_name.as_str().into(), + } + } +} diff --git a/crates/store/re_types/src/blueprint/datatypes/mod.rs b/crates/store/re_types/src/blueprint/datatypes/mod.rs index 961c260fb967a..73a10adf08b10 100644 --- a/crates/store/re_types/src/blueprint/datatypes/mod.rs +++ b/crates/store/re_types/src/blueprint/datatypes/mod.rs @@ -1,6 +1,7 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs mod component_column_selector; +mod component_column_selector_ext; mod latest_at_query; mod latest_at_query_ext; mod range_filter;