mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-12 16:32:16 +00:00
style(flow): simplify execution context restoration
Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user