From 02315bced71ad32fb970d19f5074057de29fae9a Mon Sep 17 00:00:00 2001 From: discord9 Date: Thu, 10 Sep 2026 15:12:29 +0800 Subject: [PATCH] style(flow): simplify execution context restoration Signed-off-by: discord9 --- src/flow/src/batching_mode/task.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flow/src/batching_mode/task.rs b/src/flow/src/batching_mode/task.rs index a7fa07bcbd..de0e7ed4a4 100644 --- a/src/flow/src/batching_mode/task.rs +++ b/src/flow/src/batching_mode/task.rs @@ -223,10 +223,10 @@ impl BatchingExecutionGuard { impl Drop for BatchingExecutionGuard { fn drop(&mut self) { - if let Some((state, old_ctx)) = self.restore.take() { - if let Ok(mut state) = state.write() { - state.query_ctx = old_ctx; - } + if let Some((state, old_ctx)) = self.restore.take() + && let Ok(mut state) = state.write() + { + state.query_ctx = old_ctx; } } }