Skip to content

fix(llm-access-codex): drop bool literal asserts to satisfy clippy --tests#6

Merged
acking-you merged 1 commit into
masterfrom
fix/codex-clippy-assert-bool
May 30, 2026
Merged

fix(llm-access-codex): drop bool literal asserts to satisfy clippy --tests#6
acking-you merged 1 commit into
masterfrom
fix/codex-clippy-assert-bool

Conversation

@acking-you
Copy link
Copy Markdown
Owner

Summary

clippy on master is red after PR #4. The failure is clippy::bool_assert_comparison
on three assert_eq!(x, true/false) calls in llm-access-codex/src/request/mod.rs
tests:

error: used `assert_eq!` with a literal bool
   --> llm-access-codex/src/request/mod.rs:345 / :346 / :450

These are pre-existing test asserts carried over verbatim from the original
request.rs. They only surfaced now because CI never ran clippy --tests on
llm-access-codex until the affected-crate CI (PR #5) started linting changed
crates with --tests.

What changed

Three lines, behaviour-identical:

- assert_eq!(prepared.wants_stream, false);          + assert!(!prepared.wants_stream);
- assert_eq!(prepared.force_upstream_stream, true);  + assert!(prepared.force_upstream_stream);
- assert_eq!(prepared.force_upstream_stream, true);  + assert!(prepared.force_upstream_stream);

Verification

  • cargo clippy -p llm-access-codex --tests -- -D warnings — clean (this is the
    exact command the affected-crate CI runs for a codex-only change).
  • 79 codex + 256 llm-access tests pass.

clippy::bool_assert_comparison fires on `assert_eq!(x, true/false)`; rewrite
the three in request/mod.rs tests as `assert!(x)` / `assert!(!x)`. These are
pre-existing test asserts from the original request.rs that only surfaced now:
CI never ran clippy --tests on llm-access-codex until the affected-crate CI
(PR #5) started linting changed crates with --tests.

Verified: cargo clippy -p llm-access-codex --tests -- -D warnings is clean,
and 79 codex + 256 llm-access tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies unit test assertions in llm-access-codex/src/request/mod.rs by replacing assert_eq! comparisons against boolean literals with more idiomatic assert! and assert!(!...) macros. There are no review comments, and the changes are clean and correct. I have no feedback to provide.

@acking-you acking-you merged commit 12bcbe0 into master May 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant