From 80b056d8e1dfa247e61f81df84145323ffb245fe Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 19 Oct 2023 09:57:41 +0200 Subject: [PATCH] pr comments --- crates/re_arrow_store/src/store_gc.rs | 4 ++-- crates/re_log_types/src/num_instances.rs | 2 ++ crates/re_types/definitions/rerun/datatypes/uint32.fbs | 2 +- crates/re_types_core/src/datatypes/uint32.rs | 2 +- docs/content/reference/types/datatypes/uint32.md | 2 +- rerun_cpp/src/rerun/datatypes/uint32.hpp | 2 +- rerun_py/rerun_sdk/rerun/datatypes/uint32.py | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/re_arrow_store/src/store_gc.rs b/crates/re_arrow_store/src/store_gc.rs index 181048e9aacb..e05340136b08 100644 --- a/crates/re_arrow_store/src/store_gc.rs +++ b/crates/re_arrow_store/src/store_gc.rs @@ -373,7 +373,7 @@ impl DataStore { self.timeless_tables.retain(|_, table| { // If any column is non-empty, we need to keep this table for num in &table.col_num_instances { - if num != &0.into() { + if num.get() != 0 { return true; } } @@ -395,7 +395,7 @@ impl DataStore { for bucket in table.buckets.values() { let inner = bucket.inner.read(); for num in &inner.col_num_instances { - if num != &0.into() { + if num.get() != 0 { return true; } } diff --git a/crates/re_log_types/src/num_instances.rs b/crates/re_log_types/src/num_instances.rs index 14930e0042ee..093f1258f271 100644 --- a/crates/re_log_types/src/num_instances.rs +++ b/crates/re_log_types/src/num_instances.rs @@ -17,12 +17,14 @@ impl NumInstances { } impl From for u32 { + #[inline] fn from(val: NumInstances) -> Self { val.0 } } impl From for NumInstances { + #[inline] fn from(value: u32) -> Self { Self(value) } diff --git a/crates/re_types/definitions/rerun/datatypes/uint32.fbs b/crates/re_types/definitions/rerun/datatypes/uint32.fbs index 181c81375476..be704fcfaa03 100644 --- a/crates/re_types/definitions/rerun/datatypes/uint32.fbs +++ b/crates/re_types/definitions/rerun/datatypes/uint32.fbs @@ -5,7 +5,7 @@ include "rust/attributes.fbs"; namespace rerun.datatypes; -/// A 32bit integer. +/// A 32bit unsigned integer. struct UInt32 ( "attr.arrow.transparent", "attr.rust.derive": "Copy, PartialEq, Eq, PartialOrd, Ord", diff --git a/crates/re_types_core/src/datatypes/uint32.rs b/crates/re_types_core/src/datatypes/uint32.rs index e6a4aac09576..728f5408c582 100644 --- a/crates/re_types_core/src/datatypes/uint32.rs +++ b/crates/re_types_core/src/datatypes/uint32.rs @@ -21,7 +21,7 @@ use crate::SerializationResult; use crate::{ComponentBatch, MaybeOwnedComponentBatch}; use crate::{DeserializationError, DeserializationResult}; -/// **Datatype**: A 32bit integer. +/// **Datatype**: A 32bit unsigned integer. #[derive(Clone, Debug, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct UInt32(pub u32); diff --git a/docs/content/reference/types/datatypes/uint32.md b/docs/content/reference/types/datatypes/uint32.md index d8aadfefb765..29656ee2e286 100644 --- a/docs/content/reference/types/datatypes/uint32.md +++ b/docs/content/reference/types/datatypes/uint32.md @@ -2,7 +2,7 @@ title: "UInt32" --- -A 32bit integer. +A 32bit unsigned integer. ## Links diff --git a/rerun_cpp/src/rerun/datatypes/uint32.hpp b/rerun_cpp/src/rerun/datatypes/uint32.hpp index 42aae277aee6..17335cbdac2c 100644 --- a/rerun_cpp/src/rerun/datatypes/uint32.hpp +++ b/rerun_cpp/src/rerun/datatypes/uint32.hpp @@ -21,7 +21,7 @@ namespace arrow { namespace rerun { namespace datatypes { - /// **Datatype**: A 32bit integer. + /// **Datatype**: A 32bit unsigned integer. struct UInt32 { uint32_t value; diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uint32.py b/rerun_py/rerun_sdk/rerun/datatypes/uint32.py index 1da24aa18a2b..478a66c2ec2a 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uint32.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uint32.py @@ -19,7 +19,7 @@ @define(init=False) class UInt32: - """**Datatype**: A 32bit integer.""" + """**Datatype**: A 32bit unsigned integer.""" def __init__(self: Any, value: UInt32Like): """Create a new instance of the UInt32 datatype."""