mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-11 02:24:49 +08:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user