Skip to content

Commit

Permalink
Fix downcast typo in line visualizers (#8579)
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc authored Jan 6, 2025
1 parent 87902e6 commit 9699349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/viewer/re_view_spatial/src/visualizers/lines2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl VisualizerSystem for Lines2DVisualizer {

let num_strips = all_strip_chunks
.iter()
.flat_map(|chunk| chunk.iter_slices::<[f32; 2]>(LineStrip2D::name()))
.flat_map(|chunk| chunk.iter_slices::<&[[f32; 2]]>(LineStrip2D::name()))
.map(|strips| strips.len())
.sum();
if num_strips == 0 {
Expand All @@ -209,7 +209,7 @@ impl VisualizerSystem for Lines2DVisualizer {

let num_vertices = all_strip_chunks
.iter()
.flat_map(|chunk| chunk.iter_slices::<[f32; 2]>(LineStrip2D::name()))
.flat_map(|chunk| chunk.iter_slices::<&[[f32; 2]]>(LineStrip2D::name()))
.map(|strips| strips.iter().map(|strip| strip.len()).sum::<usize>())
.sum::<usize>();
line_builder.reserve_vertices(num_vertices)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/viewer/re_view_spatial/src/visualizers/lines3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl VisualizerSystem for Lines3DVisualizer {

let num_strips = all_strip_chunks
.iter()
.flat_map(|chunk| chunk.iter_slices::<[f32; 3]>(LineStrip3D::name()))
.flat_map(|chunk| chunk.iter_slices::<&[[f32; 3]]>(LineStrip3D::name()))
.map(|strips| strips.len())
.sum();
if num_strips == 0 {
Expand All @@ -212,7 +212,7 @@ impl VisualizerSystem for Lines3DVisualizer {

let num_vertices = all_strip_chunks
.iter()
.flat_map(|chunk| chunk.iter_slices::<[f32; 3]>(LineStrip3D::name()))
.flat_map(|chunk| chunk.iter_slices::<&[[f32; 3]]>(LineStrip3D::name()))
.map(|strips| strips.iter().map(|strip| strip.len()).sum::<usize>())
.sum::<usize>();
line_builder.reserve_vertices(num_vertices)?;
Expand Down

0 comments on commit 9699349

Please sign in to comment.