Skip to content

Commit

Permalink
Blob, ImageData & ShowLabels no longer implement Default
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Oct 24, 2024
1 parent 776d271 commit 77b6ca6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ table Blob (
"attr.arrow.transparent",
"attr.python.aliases": "bytes, npt.NDArray[np.uint8]",
"attr.python.array_aliases": "bytes, npt.NDArray[np.uint8]",
"attr.rust.derive": "Default, PartialEq, Eq",
"attr.rust.derive": "PartialEq, Eq",
"attr.rust.repr": "transparent"
) {
data: rerun.datatypes.Blob (order: 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ table ImageBuffer (
"attr.arrow.transparent",
"attr.python.aliases": "bytes, npt.NDArray[np.uint8]",
"attr.python.array_aliases": "bytes, npt.NDArray[np.uint8]",
"attr.rust.derive": "Default, PartialEq, Eq",
"attr.rust.derive": "PartialEq, Eq",
"attr.rust.repr": "transparent"
) {
buffer: rerun.datatypes.Blob (order: 100);
Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_types/src/components/blob.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/store/re_types/src/components/image_buffer.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions crates/store/re_types/src/components/show_labels_ext.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
use super::ShowLabels;

impl Default for ShowLabels {
#[inline]
fn default() -> Self {
// We don't actually use this default -- visualizers choose a fallback value --
// but it is necessary to satisfy `re_viewer::reflection::generate_component_reflection()`.
Self(true.into())
}
}

impl From<ShowLabels> for bool {
#[inline]
fn from(value: ShowLabels) -> Self {
Expand Down
7 changes: 0 additions & 7 deletions crates/store/re_types/src/datatypes/blob_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ impl From<Vec<u8>> for Blob {
}
}

impl Default for Blob {
#[inline]
fn default() -> Self {
Self(Vec::new().into())
}
}

impl std::ops::Deref for Blob {
type Target = re_types_core::ArrowBuffer<u8>;

Expand Down
6 changes: 3 additions & 3 deletions crates/viewer/re_viewer/src/reflection/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 77b6ca6

Please sign in to comment.