chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715)
* chore: add #[non_exhaustive] to reduce backwards-incompatible changes going forward * fix: remove ProtocolVersion import * fix: add a few more with_ mutator methods --------- Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
parent
79834b6211
commit
f63718d202
1 changed files with 1568 additions and 1110 deletions
|
|
@ -327,12 +327,7 @@ async fn test_empty_content_deserializes_as_call_tool_result_variant() {
|
|||
|
||||
#[tokio::test]
|
||||
async fn test_empty_content_roundtrip() {
|
||||
let result = CallToolResult {
|
||||
content: vec![],
|
||||
structured_content: None,
|
||||
is_error: Some(false),
|
||||
meta: None,
|
||||
};
|
||||
let result = CallToolResult::success(vec![]);
|
||||
let v = serde_json::to_value(&result).unwrap();
|
||||
assert_eq!(v["content"], json!([]));
|
||||
let deserialized: CallToolResult = serde_json::from_value(v).unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue