From 6ae8850d45833cddfe81118ee207203ea1e36faf Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 10 Apr 2026 07:33:22 +0900 Subject: [PATCH] fix(api): silence dead_code warning and remove duplicated #[test] attr - Add #[allow(dead_code)] on test-only Delta struct (content field used for deserialization but not read in assertion) - Remove duplicated #[test] attribute on assistant_message_without_tool_calls_omits_tool_calls_field Zero warnings in cargo test --workspace. --- rust/crates/api/src/providers/openai_compat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/crates/api/src/providers/openai_compat.rs b/rust/crates/api/src/providers/openai_compat.rs index 00035db..1d46ee6 100644 --- a/rust/crates/api/src/providers/openai_compat.rs +++ b/rust/crates/api/src/providers/openai_compat.rs @@ -1652,6 +1652,7 @@ mod tests { }"#; use super::deserialize_null_as_empty_vec; + #[allow(dead_code)] #[derive(serde::Deserialize, Debug)] struct Delta { content: Option, @@ -1666,7 +1667,6 @@ mod tests { ); } - #[test] /// Regression: when building a multi-turn request where a prior assistant /// turn has no tool calls, the serialized assistant message must NOT include /// `tool_calls: []`. Some providers reject requests that carry an empty