Fix cargo fmt formatting and diarize threading test mock

This commit is contained in:
Claude
2026-03-20 13:56:32 -07:00
parent 0771508203
commit 42ccd3e21d
9 changed files with 39 additions and 30 deletions

View File

@@ -108,7 +108,10 @@ impl SidecarManager {
}
}
// Non-JSON or non-ready line — skip and keep waiting
eprintln!("[sidecar-rs] Skipping pre-ready line: {}", &trimmed[..trimmed.len().min(200)]);
eprintln!(
"[sidecar-rs] Skipping pre-ready line: {}",
&trimmed[..trimmed.len().min(200)]
);
continue;
}
}
@@ -165,7 +168,10 @@ impl SidecarManager {
let response: IPCMessage = match serde_json::from_str(trimmed) {
Ok(msg) => msg,
Err(_) => {
eprintln!("[sidecar-rs] Skipping non-JSON line: {}", &trimmed[..trimmed.len().min(200)]);
eprintln!(
"[sidecar-rs] Skipping non-JSON line: {}",
&trimmed[..trimmed.len().min(200)]
);
continue;
}
};
@@ -226,8 +232,8 @@ impl SidecarManager {
if trimmed.is_empty() {
continue;
}
let response: IPCMessage = serde_json::from_str(trimmed)
.map_err(|e| format!("Parse error: {e}"))?;
let response: IPCMessage =
serde_json::from_str(trimmed).map_err(|e| format!("Parse error: {e}"))?;
// Forward intermediate messages via callback, return the final result/error
let is_intermediate = matches!(