Skip to content

Commit 47e5d23

Browse files
author
Brandon Bennett
committed
style(rmcp): apply cargo fmt
1 parent 75d1d3f commit 47e5d23

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

crates/rmcp/src/handler/server/common.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ mod tests {
350350
let schema = result.unwrap();
351351
let schema_str = serde_json::to_string(&schema).unwrap();
352352
assert!(
353-
schema_str.contains("anyOf") || schema_str.contains("oneOf") || schema_str.contains("null"),
353+
schema_str.contains("anyOf")
354+
|| schema_str.contains("oneOf")
355+
|| schema_str.contains("null"),
354356
"Expected composition schema for Option<String>, got: {schema_str}"
355357
);
356358
}
@@ -361,7 +363,10 @@ mod tests {
361363
let result2 = schema_for_output::<i32>();
362364
assert!(result1.is_ok());
363365
assert!(result2.is_ok());
364-
assert!(Arc::ptr_eq(result1.as_ref().unwrap(), result2.as_ref().unwrap()));
366+
assert!(Arc::ptr_eq(
367+
result1.as_ref().unwrap(),
368+
result2.as_ref().unwrap()
369+
));
365370
}
366371

367372
#[test]

crates/rmcp/tests/test_json_schema_detection.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,7 @@ async fn test_json_string_type_generates_schema() {
174174
let server = TestServer::new();
175175
let tools = server.tool_router.list_all();
176176

177-
let string_tool = tools
178-
.iter()
179-
.find(|t| t.name == "with-json-string")
180-
.unwrap();
177+
let string_tool = tools.iter().find(|t| t.name == "with-json-string").unwrap();
181178
assert!(
182179
string_tool.output_schema.is_some(),
183180
"Json<String> return type should generate output schema"

crates/rmcp/tests/test_structured_output.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ impl TestServer {
9595
}
9696

9797
/// Tool that returns a list of calculation results
98-
#[tool(name = "calculate-list", description = "Return a list of calculation results")]
98+
#[tool(
99+
name = "calculate-list",
100+
description = "Return a list of calculation results"
101+
)]
99102
pub async fn calculate_list(
100103
&self,
101104
params: Parameters<CalculationRequest>,

crates/rmcp/tests/test_tool_builder_methods.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ fn test_with_output_schema_primitive() {
7676

7777
#[test]
7878
fn test_with_output_schema_array() {
79-
let tool = Tool::new("test", "Test tool", JsonObject::new())
80-
.with_output_schema::<Vec<String>>();
79+
let tool =
80+
Tool::new("test", "Test tool", JsonObject::new()).with_output_schema::<Vec<String>>();
8181

8282
assert!(tool.output_schema.is_some());
8383

@@ -90,8 +90,8 @@ fn test_with_output_schema_array() {
9090

9191
#[test]
9292
fn test_with_output_schema_option() {
93-
let tool = Tool::new("test", "Test tool", JsonObject::new())
94-
.with_output_schema::<Option<String>>();
93+
let tool =
94+
Tool::new("test", "Test tool", JsonObject::new()).with_output_schema::<Option<String>>();
9595

9696
assert!(tool.output_schema.is_some());
9797

0 commit comments

Comments
 (0)