Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 17, 2025
1 parent d71d1e2 commit e94a3b1
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 19 deletions.
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5734,7 +5734,6 @@ dependencies = [
"once_cell",
"parking_lot",
"rand",
"re_arrow2",
"re_arrow_util",
"re_byte_size",
"re_chunk",
Expand Down
14 changes: 4 additions & 10 deletions crates/store/re_chunk/src/merge.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use arrow::array::StructArray as ArrowStructArray;
use arrow::buffer::ScalarBuffer as ArrowScalarBuffer;
use arrow::array::{Array as ArrowArray, ListArray as ArrowListArray};
use arrow::buffer::ScalarBuffer as ArrowScalarBuffer;
use itertools::{izip, Itertools};
use nohash_hasher::IntMap;

use re_arrow_util::{
arrow_util, ArrowArrayDowncastRef as _,
};
use re_arrow_util::{arrow_util, ArrowArrayDowncastRef as _};

use crate::{chunk::ChunkComponents, Chunk, ChunkError, ChunkId, ChunkResult, TimeColumn};

Expand Down Expand Up @@ -108,9 +106,7 @@ impl Chunk {

let list_array =
arrow_util::concat_arrays(&[lhs_list_array, rhs_list_array]).ok()?;
let list_array = list_array
.downcast_array_ref::<ArrowListArray>()?
.clone();
let list_array = list_array.downcast_array_ref::<ArrowListArray>()?.clone();

Some((component_desc.clone(), list_array))
} else {
Expand Down Expand Up @@ -149,9 +145,7 @@ impl Chunk {

let list_array =
arrow_util::concat_arrays(&[lhs_list_array, rhs_list_array]).ok()?;
let list_array = list_array
.downcast_array_ref::<ArrowListArray>()?
.clone();
let list_array = list_array.downcast_array_ref::<ArrowListArray>()?.clone();

Some((component_desc.clone(), list_array))
} else {
Expand Down
1 change: 0 additions & 1 deletion crates/store/re_chunk_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ re_types_core.workspace = true
ahash.workspace = true
anyhow.workspace = true
arrow.workspace = true
arrow2 = { workspace = true, features = ["compute_concatenate"] }
document-features.workspace = true
indent.workspace = true
itertools.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ impl VisualizerSystem for Boxes2DVisualizer {
labels: labels.unwrap_or_default(),
class_ids: class_ids
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ impl VisualizerSystem for Boxes3DVisualizer {
labels: labels.unwrap_or_default(),
class_ids: class_ids
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ impl VisualizerSystem for Capsules3DVisualizer {
labels: labels.unwrap_or_default(),
class_ids: class_ids
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ impl VisualizerSystem for Ellipsoids3DVisualizer {
labels: labels.unwrap_or_default(),
class_ids: class_ids
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/lines3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ impl VisualizerSystem for Lines3DVisualizer {
labels: labels.unwrap_or_default(),
class_ids: class_ids
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/points2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ impl VisualizerSystem for Points2DVisualizer {
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
keypoint_ids: keypoint_ids
.map_or(&[], |keypoint_ids| bytemuck::cast_slice(keypoint_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_view_spatial/src/visualizers/points3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ impl VisualizerSystem for Points3DVisualizer {
.map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)),
keypoint_ids: keypoint_ids
.map_or(&[], |keypoint_ids| bytemuck::cast_slice(keypoint_ids)),
show_labels: show_labels.map(|b| !b.is_empty() && b.value(0))
show_labels: show_labels
.map(|b| !b.is_empty() && b.value(0))
.map(Into::into),
}
},
Expand Down

0 comments on commit e94a3b1

Please sign in to comment.