Skip to content

chore(lint): a failed test shows what the result held instead of asserting is_ok - #718

Draft
PiquelChips wants to merge 1 commit into
mainfrom
chore/assertions-on-result-states
Draft

PiquelChips wants to merge 1 commit into
mainfrom
chore/assertions-on-result-states

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

What and why

Turns on clippy::assertions_on_result_states: assert!(result.is_err()) says only that a test failed, not what it got instead. Each of the 61 test sites now calls .expect(…) or .expect_err(…) on the result, so a failure prints the unexpected Ok or Err value. No #[expect] was needed, and no production code changed.

Testing

cargo clippy -- -D warnings passes over the workspace and over each crate alone; cargo nextest run --workspace passes (the database tests are skipped without a scratch cluster).

Note

Written by Claude Sonnet 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant