Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jul 24, 2023
1 parent 75091c9 commit d70ec97
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 26 deletions.
8 changes: 0 additions & 8 deletions crates/re_components/src/color.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
/// An RGBA color tuple with unmultiplied/separate alpha,
/// in sRGB gamma space with linear alpha.
///
/// ```
/// use re_types::components::ColorRGBA;
/// use arrow2_convert::field::ArrowField;
/// use arrow2::datatypes::{DataType, Field};
///
/// assert_eq!(ColorRGBA::data_type(), DataType::UInt32);
/// ```
#[derive(
Clone,
Copy,
Expand Down
8 changes: 0 additions & 8 deletions crates/re_components/src/label.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
use arrow2_convert::{ArrowDeserialize, ArrowField, ArrowSerialize};

/// A String label component
///
/// ```
/// use re_components::Label;
/// use arrow2_convert::field::ArrowField;
/// use arrow2::datatypes::{DataType, Field};
///
/// assert_eq!(Label::data_type(), DataType::Utf8);
/// ```
#[derive(Debug, Clone, PartialEq, Eq, ArrowField, ArrowSerialize, ArrowDeserialize)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[arrow_field(transparent)]
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/src/component_ui_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn create_component_ui_registry() -> ComponentUiRegistry {
add::<re_types::components::ClassId>(&mut registry);
add::<re_types::components::Color>(&mut registry);
add::<re_types::components::KeypointId>(&mut registry);
// add::<re_components::Label>(&mut registry);
// add::<re_types::components::Label>(&mut registry);
add::<re_components::LineStrip2D>(&mut registry);
add::<re_components::LineStrip3D>(&mut registry);
add::<re_components::Mesh3D>(&mut registry);
Expand Down
13 changes: 6 additions & 7 deletions crates/re_query/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
//! # Usage
//! ```
//! # use re_query::EntityView;
//! # use re_components::{ColorRGBA, Point2D};
//! # use re_types::components::InstanceKey;
//! # use re_types::components::{Color, Point2D, InstanceKey};
//!
//! let instances = InstanceKey::from_iter(0..3);
//!
Expand All @@ -19,9 +18,9 @@
//! ];
//!
//! let colors = [
//! ColorRGBA(0),
//! ColorRGBA(1),
//! ColorRGBA(2),
//! Color(0),
//! Color(1),
//! Color(2),
//! ];
//!
//! let entity_view = EntityView::from_native2(
Expand All @@ -30,10 +29,10 @@
//! );
//!
//! let mut points_out = Vec::<Point2D>::new();
//! let mut colors_out = Vec::<ColorRGBA>::new();
//! let mut colors_out = Vec::<Color>::new();
//!
//! entity_view
//! .visit2(|_: InstanceKey, point: Point2D, color: Option<ColorRGBA>| {
//! .visit2(|_: InstanceKey, point: Point2D, color: Option<Color>| {
//! points_out.push(point);
//! colors_out.push(color.unwrap());
//! })
Expand Down
4 changes: 2 additions & 2 deletions crates/rerun/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
//! # use rerun::external::image;
//! # fn capture_image() -> image::DynamicImage { Default::default() }
//! # fn positions() -> Vec<rerun::components::Point3D> { Default::default() }
//! # fn colors() -> Vec<rerun::components::ColorRGBA> { Default::default() }
//! # fn colors() -> Vec<rerun::components::Color> { Default::default() }
//! let rec_stream = rerun::RecordingStreamBuilder::new("my_app").buffered()?;
//!
//! let points: Vec<rerun::components::Point3D> = positions();
//! let colors: Vec<rerun::components::ColorRGBA> = colors();
//! let colors: Vec<rerun::components::Color> = colors();
//! let image: image::DynamicImage = capture_image();
//!
//! rerun::MsgSender::new("points")
Expand Down

0 comments on commit d70ec97

Please sign in to comment.