Skip to content

Commit a72f713

Browse files
committed
Collapse if condition
1 parent 6889344 commit a72f713

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

bottlecap/src/logs/agent.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ impl LogsAgent {
6565
Some((request_id, execution_id, execution_name)) = self.durable_context_rx.recv() => {
6666
self.processor.insert_to_durable_map(&request_id, &execution_id, &execution_name);
6767
let ready_logs = self.processor.take_ready_logs();
68-
if !ready_logs.is_empty() {
69-
if let Err(e) = self.aggregator_handle.insert_batch(ready_logs) {
70-
error!("LOGS_AGENT | Failed to insert batch: {}", e);
71-
}
68+
if !ready_logs.is_empty() && let Err(e) = self.aggregator_handle.insert_batch(ready_logs) {
69+
error!("LOGS_AGENT | Failed to insert batch: {}", e);
7270
}
7371
}
7472
() = self.cancel_token.cancelled() => {

0 commit comments

Comments
 (0)