Repository navigation
chore: fix the new clippy lint in tests - #120
Closed
felipefreitag wants to merge 1 commit into
Closed
felipefreitag wants to merge 1 commit into
felipefreitag wants to merge 1 commit into
Conversation
klotty
approved these changes
Oct 12, 2026
klotty
left a comment
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Test-only change that rewrites is_empty assertions as assert_eq!/assert_ne! to satisfy a new Clippy lint, preserving the asserted behavior and unblocking CI.
View guided diff | Re-trigger cubic
Collaborator
|
I saw this after updating them myself manually so I think its fine to close (?) |
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.
What fails
The Lint job fails on every open PR, for example #119. Clippy reports 11 errors in old tests in
src/emails.rs,src/events.rsandsrc/templates.rs.Why
Rust 1.99.0 adds the
clippy::assert_is_emptylint. The lint rejectsassert!(x.is_empty())andassert!(!x.is_empty()). CI uses the latest stable toolchain and runs clippy with-Dwarnings, so each warning is an error.What changed
assert!(x.is_empty())is nowassert_eq!against an empty value. Eachassert!(!x.is_empty())is nowassert_ne!.Vecfields, the empty value isVec::<T>::new(). Clippy suggests[] as [T; 0], but the crate deniestrivial_casts, so that form does not compile.urlstring, the empty value is"", as clippy suggests.The assertions check the same conditions as before. Only test code changes, so there is no version bump.
Verification
cargo clippy --all-targets -- -Dwarningspasses for the async,rustls-tlsandblockingconfigurations, with clippy 0.1.99.cargo fmt --checkandcargo buildpass.share_emailtest needsRESEND_API_KEYand runs in CI.This unblocks the Lint check on open PRs such as #119.
Summary by cubic
Fixes the failing Lint job on all open PRs by updating test assertions to satisfy the new
clippy::assert_is_emptylint added in Rust 1.99.0.assert!(x.is_empty())withassert_eq!andassert!(!x.is_empty())withassert_ne!in test code insrc/emails.rs,src/events.rs, andsrc/templates.rs.Vec::<T>::new()as the empty value instead of[] as [T; 0], which the crate cannot compile because it deniestrivial_casts.Written for commit 6bd0b84. Summary will update on new commits.