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.
This commit is contained in:
YeonGyu-Kim
2026-04-10 07:33:22 +09:00
parent ef9439d772
commit 6ae8850d45

View File

@@ -1652,6 +1652,7 @@ mod tests {
}"#; }"#;
use super::deserialize_null_as_empty_vec; use super::deserialize_null_as_empty_vec;
#[allow(dead_code)]
#[derive(serde::Deserialize, Debug)] #[derive(serde::Deserialize, Debug)]
struct Delta { struct Delta {
content: Option<String>, content: Option<String>,
@@ -1666,7 +1667,6 @@ mod tests {
); );
} }
#[test]
/// Regression: when building a multi-turn request where a prior assistant /// Regression: when building a multi-turn request where a prior assistant
/// turn has no tool calls, the serialized assistant message must NOT include /// turn has no tool calls, the serialized assistant message must NOT include
/// `tool_calls: []`. Some providers reject requests that carry an empty /// `tool_calls: []`. Some providers reject requests that carry an empty