Skip to content

Conversation

@jerrysxie
Copy link
Contributor

This pull request adds Clippy lint suppressions and explanatory comments to improve code clarity and maintainability in non-deployed code paths. The changes focus on documenting and justifying the use of potentially unsafe operations in test or procedural macro code.

Error handling and lint suppression improvements:

  • Added #[allow(clippy::unwrap_used)] and comments explaining the safety of unwrap() usage in partition-manager/macros/src/lib.rs, since CARGO_MANIFEST_DIR is guaranteed to be set in this context and the code is not deployed.
  • Added #[allow(clippy::indexing_slicing)] and comments in partition-manager/generation/src/lib.rs to justify safe slicing and indexing in non-deployed code, preventing false-positive linter warnings.* Panics in not deployed code, can be ignored.

* Panics in not deployed code, can be ignored.
@jerrysxie jerrysxie self-assigned this Dec 20, 2025
Copilot AI review requested due to automatic review settings December 20, 2025 00:40
@jerrysxie jerrysxie added the documentation Improvements or additions to documentation label Dec 20, 2025
Copy link
Contributor

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 Clippy lint suppressions with explanatory comments for potentially unsafe operations in non-deployed code paths (procedural macros and code generation). The changes aim to document why certain operations that would normally trigger Clippy warnings are safe in these specific contexts.

  • Adds #[allow(clippy::unwrap_used)] attributes with safety comments in procedural macro code
  • Adds #[allow(clippy::indexing_slicing)] attribute with safety comment in validation code

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
partition-manager/macros/src/lib.rs Adds two lint suppressions for unwrap() usage in procedural macro code with explanatory comments
partition-manager/generation/src/lib.rs Adds lint suppression for indexing/slicing in partition overlap validation logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jerrysxie jerrysxie marked this pull request as ready for review December 20, 2025 00:43
@jerrysxie jerrysxie requested a review from a team as a code owner December 20, 2025 00:43
@jerrysxie jerrysxie requested a review from tullom December 20, 2025 00:43
@jerrysxie jerrysxie enabled auto-merge (squash) December 20, 2025 00:43
kurtjd
kurtjd previously approved these changes Dec 20, 2025
kurtjd
kurtjd previously approved these changes Dec 22, 2025
Copilot AI review requested due to automatic review settings December 22, 2025 16:34
Copy link
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jerrysxie jerrysxie merged commit 72ea4e5 into OpenDevicePartnership:main Dec 23, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants