Skip to content

Commit ded4f08

Browse files
committed
lint and comments
1 parent 75d52b9 commit ded4f08

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

crates/top/re_sdk/src/lenses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ mod ast {
287287
pub entity_path: EntityPath,
288288
pub component_descr: ComponentDescriptor,
289289
pub ops: Vec<Op>,
290-
// TODO(grtlr): It would be much nicer if static could be infered from the output of the operations?
290+
// TODO(grtlr): It would be much nicer if static could be inferred from the output of the operations?
291291
pub is_static: bool,
292292
}
293293
}

examples/rust/lenses/src/main.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn lens_flag() -> anyhow::Result<Lens> {
5252
.next()
5353
.unwrap();
5454

55-
let lens = Lens::input_column("/flag".parse()?, "com.Example.Flag:flag")
55+
let lens = Lens::input_column("/flag".parse()?, "example:Flag:flag")
5656
.output_column("/flag", Scalars::descriptor_scalars(), [Op::func(step_fn)])
5757
.static_output_column(
5858
"/flag",
@@ -72,11 +72,11 @@ fn lens_flag() -> anyhow::Result<Lens> {
7272
fn main() -> anyhow::Result<()> {
7373
re_log::setup_logging();
7474

75-
let instruction = Lens::input_column("/instructions".parse()?, "com.Example.Instruction:text")
75+
let instruction = Lens::input_column("/instructions".parse()?, "example:Instruction:text")
7676
.output_column("instructions", TextDocument::descriptor_text(), [])
7777
.build();
7878

79-
let destructure = Lens::input_column("/nested".parse()?, "com.Example.Nested:payload")
79+
let destructure = Lens::input_column("/nested".parse()?, "example:Nested:payload")
8080
.output_column(
8181
"nested/a",
8282
Scalars::descriptor_scalars(),
@@ -113,8 +113,7 @@ fn log_flag(rec: &RecordingStream) -> anyhow::Result<()> {
113113
rec.set_time("tick", TimeCell::from_sequence(x));
114114
rec.log(
115115
"flag",
116-
&DynamicArchetype::new("com.Example.Flag")
117-
.with_component_from_data("flag", Arc::new(flag)),
116+
&DynamicArchetype::new("example:Flag").with_component_from_data("flag", Arc::new(flag)),
118117
)?
119118
}
120119

@@ -125,7 +124,7 @@ fn log_instructions(rec: &RecordingStream) -> anyhow::Result<()> {
125124
rec.set_time("tick", TimeCell::from_sequence(1));
126125
rec.log(
127126
"instructions",
128-
&DynamicArchetype::new("com.Example.Instruction").with_component_from_data(
127+
&DynamicArchetype::new("example:Instruction").with_component_from_data(
129128
"text",
130129
Arc::new(arrow::array::StringArray::from(vec![
131130
"This is a nice instruction text.",
@@ -154,7 +153,7 @@ fn log_structs_with_scalars(rec: &RecordingStream) -> anyhow::Result<()> {
154153
rec.set_time("tick", TimeCell::from_sequence(x));
155154
rec.log(
156155
"nested",
157-
&DynamicArchetype::new("com.Example.Nested")
156+
&DynamicArchetype::new("example:Nested")
158157
.with_component_from_data("payload", Arc::new(struct_array)),
159158
)?
160159
}

0 commit comments

Comments
 (0)