chore: silence unused-import warning in test_ibe macro#34
Merged
Conversation
The `use super::*;` glob in test_ibe! is required (the macro body references PublicKey, SecretKey, UserSecretKey, CipherText, Msg, IBE, and the scheme type from the parent module), but clippy reports it as unused because not every call site exercises every re-export the same way. Annotate with #[allow(unused_imports)] to suppress the false positive without dropping the import. Closes #33 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
Rule compliance check: assigned @rubenhensen as reviewer (per the pr-review-assignments rule). |
Contributor
Author
There was a problem hiding this comment.
Verified locally:
cargo clippy --all-features --all-targets— clean, no warningscargo test --all-features— 21 passed- Confirmed removing
use super::*;is not viable: the macro body references PublicKey/SecretKey/UserSecretKey/CipherText/Msg/IBE/Waters/WatersNaccache/BoyenWaters via the glob.
The #[allow(unused_imports)] annotation is a precise, minimal fix — clippy's per-expansion usage tracking can't see the import is actually used across the three call sites, so suppressing at the import line (rather than at every call site) is the correct scope. Looks good to me; cannot self-approve.
rubenhensen
approved these changes
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #33.
Summary
The
test_ibe!macro insrc/test_macros.rsemits one clippy warning:The issue suggested simply removing the
use super::*;line. That doesn't work: the macro body referencesPublicKey,SecretKey,UserSecretKey,CipherText,Msg, theIBEtrait, and each scheme type (Waters,WatersNaccache,BoyenWaters) — all brought in via the glob. Removing the line produces 42 compile errors.The warning is a clippy false positive: across the three invocation sites, the import is needed but clippy's per-expansion usage tracking can't see that. The minimal fix is to annotate the import with
#[allow(unused_imports)].Verification
cargo clippy --all-features --all-targets— warning-freecargo test --all-features— 21 passed, 0 failedcargo fmt --check— cleanReviewer quickstart