style(clippy): auto-fix code style issues and unnecessary map_or allocations detected by cargo clippy
This commit is contained in:
1 parent
febd48c65d
commit
706e9ad172
9 files changed
+131
-74
No files matched your search
@@ -1,5 +1,5 @@
|
||||
use serde_json::{Value, json};
|
||||
use std::io::{BufRead, BufReader, Write, Read};
|
||||
use std::io::{BufRead, BufReader, Read, Write};
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
fn send_message(stdin: &mut std::process::ChildStdin, msg: Value) {
|
||||
@@ -161,7 +161,11 @@ fn test_mcp_initialization_and_tools_list() {
|
||||
|
||||
send_message(&mut stdin, call_req);
|
||||
let call_resp = read_message(&mut stdout).expect("Failed to read tools/call response");
|
||||
println!("Response for {}: {}", tool_name, serde_json::to_string(&call_resp).unwrap());
|
||||
println!(
|
||||
"Response for {}: {}",
|
||||
tool_name,
|
||||
serde_json::to_string(&call_resp).unwrap()
|
||||
);
|
||||
assert_eq!(call_resp["jsonrpc"], "2.0");
|
||||
assert_eq!(call_resp["id"], req_id);
|
||||
}
|
||||
@@ -200,7 +204,11 @@ fn test_mcp_initialization_and_tools_list() {
|
||||
let _ = stderr.read_to_string(&mut stderr_output);
|
||||
println!("Child STDERR: {}", stderr_output);
|
||||
}
|
||||
|
||||
|
||||
let status = child.wait().expect("Failed to wait on child");
|
||||
assert!(status.success(), "Child process did not exit successfully. Stderr: {}", stderr_output);
|
||||
assert!(
|
||||
status.success(),
|
||||
"Child process did not exit successfully. Stderr: {}",
|
||||
stderr_output
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user