-
Notifications
You must be signed in to change notification settings - Fork 43
partition-mananger: audit panics #655
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
partition-mananger: audit panics #655
Conversation
* Panics in not deployed code, can be ignored.
There was a problem hiding this 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.
There was a problem hiding this 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.
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:
#[allow(clippy::unwrap_used)]and comments explaining the safety ofunwrap()usage inpartition-manager/macros/src/lib.rs, sinceCARGO_MANIFEST_DIRis guaranteed to be set in this context and the code is not deployed.#[allow(clippy::indexing_slicing)]and comments inpartition-manager/generation/src/lib.rsto justify safe slicing and indexing in non-deployed code, preventing false-positive linter warnings.* Panics in not deployed code, can be ignored.