From efa08a15117a0ff521ba3e11729a827823529e90 Mon Sep 17 00:00:00 2001 From: LB7666 Date: Sun, 31 May 2026 02:37:33 +0800 Subject: [PATCH] fix(llm-access-codex): drop bool literal asserts in request tests 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) --- llm-access-codex/src/request/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llm-access-codex/src/request/mod.rs b/llm-access-codex/src/request/mod.rs index 5c1fe56..e41aaff 100644 --- a/llm-access-codex/src/request/mod.rs +++ b/llm-access-codex/src/request/mod.rs @@ -342,8 +342,8 @@ mod tests { assert!(prepared.client_request_body.is_none()); assert_eq!(prepared.last_message_content.as_deref(), Some("hello")); - assert_eq!(prepared.wants_stream, false); - assert_eq!(prepared.force_upstream_stream, true); + assert!(!prepared.wants_stream); + assert!(prepared.force_upstream_stream); assert_eq!(upstream["input"][0]["type"], json!("message")); assert_eq!(upstream["input"][0]["role"], json!("user")); assert_eq!(upstream["input"][0]["content"][0]["type"], json!("input_text")); @@ -447,7 +447,7 @@ mod tests { let upstream: serde_json::Value = serde_json::from_slice(&prepared.request_body).expect("upstream body json"); - assert_eq!(prepared.force_upstream_stream, true); + assert!(prepared.force_upstream_stream); assert_eq!(upstream["stream"], json!(true)); assert!(upstream.get("temperature").is_none()); }