Skip to content

Conversation

chris-oo
Copy link
Member

@chris-oo chris-oo commented Oct 1, 2025

There's a few fields that need to be gated, along with allowing dead code. Otherwise, clippy will complain about a bunch of unused fields.

@chris-oo chris-oo requested a review from a team as a code owner October 1, 2025 23:05
@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 23:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds proper feature gating for the TimestampOutOfRange error type in the mesh_protobuf crate's time module. The change prevents clippy warnings about unused fields by ensuring the error type is only compiled when the "std" feature is enabled, where it's actually used.

  • Gates the TimestampOutOfRange error behind the "std" feature flag

jstarks
jstarks previously approved these changes Oct 1, 2025
@chris-oo
Copy link
Member Author

chris-oo commented Oct 1, 2025

hmm not quite complete, need to iterate a bit more...

smalis-msft
smalis-msft previously approved these changes Oct 2, 2025
@chris-oo chris-oo dismissed stale reviews from smalis-msft and jstarks via 40df288 October 2, 2025 16:40
@chris-oo chris-oo changed the title mesh_protobuf: gate timestamp error behind std mesh_protobuf: fix clippy errors when used in no_std Oct 2, 2025
annotation: &'a str,
}

#[cfg_attr(not(feature = "std"), allow(dead_code))]
Copy link
Contributor

Choose a reason for hiding this comment

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

expect instead of allow?

Copy link
Member Author

Choose a reason for hiding this comment

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

does that work if not all the fields are unused? it's only a few at the bottom.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, as long as the lint happens once

Copy link
Member Author

Choose a reason for hiding this comment

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

sure lemme flip em then...

Copy link

github-actions bot commented Oct 6, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants