diff --git a/src/agent/agent.rs b/src/agent/agent.rs index 56e418f..e00b56b 100644 --- a/src/agent/agent.rs +++ b/src/agent/agent.rs @@ -915,7 +915,10 @@ impl Agent { .can_push() .map_err(|e| PromoteError::QueueFull(Box::new(e)))?; - let message = self.follow_up_queue.remove(id).ok_or(PromoteError::NotFound)?; + let message = self + .follow_up_queue + .remove(id) + .ok_or(PromoteError::NotFound)?; let source_remaining = self.follow_up_queue.len(); self.emit_queue_event(QueueEvent::Removed { kind: QueueKind::FollowUp, diff --git a/tests/test_agent.rs b/tests/test_agent.rs index 2567648..777586d 100644 --- a/tests/test_agent.rs +++ b/tests/test_agent.rs @@ -618,7 +618,11 @@ fn test_promote_follow_up_event_sequence() { assert!(matches!( &captured[0], - QueueEvent::Removed { kind: QueueKind::FollowUp, count: 1, .. } + QueueEvent::Removed { + kind: QueueKind::FollowUp, + count: 1, + .. + } )); assert!(matches!( &captured[1], @@ -631,7 +635,11 @@ fn test_promote_follow_up_event_sequence() { )); assert!(matches!( &captured[2], - QueueEvent::Enqueued { kind: QueueKind::Steering, count: 1, .. } + QueueEvent::Enqueued { + kind: QueueKind::Steering, + count: 1, + .. + } )); } @@ -677,7 +685,10 @@ fn test_try_promote_follow_up_not_found() { #[test] fn test_promote_error_display() { let not_found = PromoteError::NotFound; - assert_eq!(format!("{}", not_found), "message not found in follow-up queue"); + assert_eq!( + format!("{}", not_found), + "message not found in follow-up queue" + ); // Construct a QueueFullError via Agent-level try_steer (which calls try_push) let agent = Agent::new(); @@ -726,4 +737,3 @@ fn test_queue_full_error_into_message() { let err2 = QueueFullError::new(1, 1); assert!(err2.into_message().is_none()); } - diff --git a/tests/test_agent_new_features.rs b/tests/test_agent_new_features.rs index 8e3019e..0944ab8 100644 --- a/tests/test_agent_new_features.rs +++ b/tests/test_agent_new_features.rs @@ -2363,7 +2363,10 @@ async fn test_has_queued_messages_async_caches_supplier_output() { ); // Verify messages actually ended up in the local queue - assert!(agent.has_queued_messages(), "local queue should be populated"); + assert!( + agent.has_queued_messages(), + "local queue should be populated" + ); } /// Test that `has_queued_messages_async` probes V2 steering suppliers. @@ -2409,5 +2412,8 @@ async fn test_has_queued_messages_async_probes_v2_supplier() { ); // Messages should have been cached into local queue - assert!(agent.has_queued_messages(), "V2 supplier messages should be cached"); + assert!( + agent.has_queued_messages(), + "V2 supplier messages should be cached" + ); }