style(flow): simplify execution context restoration

Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
discord9
2026-09-10 15:12:29 +08:00
parent d5b0642cfa
commit 02315bced7
+4 -4
View File
@@ -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;
}
}
}