cargo fmt

This commit is contained in:
Chris Beck
2025-12-07 19:53:42 -07:00
parent 70d09ffc98
commit b8f9030d94
3 changed files with 8 additions and 9 deletions
+1 -4
View File
@@ -197,10 +197,7 @@ impl ClaudeApi {
// Get tools from the executor if still alive
let executor = self.tool_executor.upgrade();
let tools = executor
.as_ref()
.map(|te| te.tools())
.unwrap_or_default();
let tools = executor.as_ref().map(|te| te.tools()).unwrap_or_default();
let mut messages = vec![MessageContent::user(prompt)];
info!("Claude request: {}", prompt);
+4 -1
View File
@@ -22,7 +22,10 @@ use http::{Method, Request, Response, StatusCode};
use http_body::Body;
use http_body_util::BodyExt;
use prometheus_http_client::{AlertStatus, ExtractLabels};
use std::{fmt::Write, net::SocketAddr, path::PathBuf, sync::Arc, sync::Mutex, sync::OnceLock, sync::Weak, time::Duration};
use std::{
fmt::Write, net::SocketAddr, path::PathBuf, sync::Arc, sync::Mutex, sync::OnceLock, sync::Weak,
time::Duration,
};
use tokio::{
join,
sync::mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel},
+3 -4
View File
@@ -479,10 +479,9 @@ mod tests {
#[test]
fn test_log_filter_combined() {
// msg_contains AND module_equals must both match
let filter: LogFilter = serde_json::from_str(
r#"{"msg_contains": "error", "module_equals": "test::module"}"#,
)
.unwrap();
let filter: LogFilter =
serde_json::from_str(r#"{"msg_contains": "error", "module_equals": "test::module"}"#)
.unwrap();
assert!(filter.matches(&make_log_msg("an error occurred")));
// Wrong module