Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust: more impl<AsComponents> helpers #8401

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Dec 10, 2024

New release, new helpers, as is now customary.

These only introduced two breaking changes in all of our examples and snippets, and they look pretty innocuous.

Opinions?

Comment on lines +26 to +32
rec.log_static(
"images",
&[
&format as &dyn rerun::ComponentBatch,
&rerun::Image::indicator(),
],
)?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inference only breaks due to the explicit indicator shenanigans here, which I think is fine since they're going away.
Without the indicator, this would now come down to this:

rec.log_static("images", &format)?;

which is pretty neat.

@@ -26,7 +26,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
(glam::Vec3::from(vertex_positions[1]) * factor).into(),
(glam::Vec3::from(vertex_positions[2]) * factor).into(),
];
rec.log("triangle", &[&vertex_positions as _])?;
rec.log("triangle", &vertex_positions)?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inference broke because of the unspecified as _. Now we don't need it at all, so that's just better.

Copy link

github-actions bot commented Dec 10, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
6b1b187 https://rerun.io/viewer/pr/8401 +nightly +main

Note: This comment is updated whenever you push a commit.

@teh-cmc teh-cmc added enhancement New feature or request 🦀 Rust API Rust logging API 🧑‍💻 dev experience developer experience (excluding CI) include in changelog labels Dec 10, 2024
@teh-cmc teh-cmc marked this pull request as ready for review December 10, 2024 18:04
@teh-cmc
Copy link
Member Author

teh-cmc commented Dec 10, 2024

@rerun-bot full-check

Copy link

Started a full build: https://github.com/rerun-io/rerun/actions/runs/12262036501

@teh-cmc teh-cmc changed the title Rust: more Into<AsComponents> helpers Rust: more impl<AsComponents> helpers Dec 10, 2024
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
can't have enough of those, hum :/

@teh-cmc
Copy link
Member Author

teh-cmc commented Dec 11, 2024

Alright, let's see how this goes 🙈

@teh-cmc teh-cmc merged commit d62db93 into main Dec 11, 2024
75 of 77 checks passed
@teh-cmc teh-cmc deleted the cmc/new_release_new_helpers branch December 11, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) enhancement New feature or request include in changelog 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement AsComponents for collections of AsComponents
2 participants