Skip to content

Commit

Permalink
backports
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Dec 5, 2024
1 parent f96b3af commit deb1615
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions docs/snippets/all/descriptors/descr_custom_archetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ impl CustomPoints3D {

fn overridden_position_descriptor() -> ComponentDescriptor {
CustomPosition3D::descriptor()
.or_with_archetype_name(|| "user.CustomArchetype".into())
.or_with_archetype_field_name(|| "positions".into())
.or_with_archetype_name(|| "user.CustomPoints3D".into())
.or_with_archetype_field_name(|| "custom_positions".into())
}

fn overridden_color_descriptor() -> ComponentDescriptor {
rerun::components::Color::descriptor()
.or_with_archetype_name(|| "user.CustomArchetype".into())
.or_with_archetype_name(|| "user.CustomPoints3D".into())
.or_with_archetype_field_name(|| "colors".into())
}
}
Expand Down Expand Up @@ -132,13 +132,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
component_name: "user.CustomPoints3DIndicator".into(),
},
ComponentDescriptor {
archetype_name: Some("user.CustomArchetype".into()),
archetype_name: Some("user.CustomPoints3D".into()),
archetype_field_name: Some("colors".into()),
component_name: rerun::components::Color::name(),
},
ComponentDescriptor {
archetype_name: Some("user.CustomArchetype".into()),
archetype_field_name: Some("positions".into()),
archetype_name: Some("user.CustomPoints3D".into()),
archetype_field_name: Some("custom_positions".into()),
component_name: "user.CustomPosition3D".into(),
},
];
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/all/descriptors/descr_custom_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Component for CustomPosition3D {
fn descriptor() -> ComponentDescriptor {
ComponentDescriptor {
archetype_name: Some("user.CustomArchetype".into()),
archetype_field_name: Some("user.CustomArchetypeField".into()),
archetype_field_name: Some("custom_positions".into()),
component_name: "user.CustomPosition3D".into(),
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let expected = vec![
ComponentDescriptor {
archetype_name: Some("user.CustomArchetype".into()),
archetype_field_name: Some("user.CustomArchetypeField".into()),
archetype_field_name: Some("custom_positions".into()),
component_name: "user.CustomPosition3D".into(),
}, //
];
Expand Down

0 comments on commit deb1615

Please sign in to comment.