From 05117e69fec1104c540952983fe3780d1be7b8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 23 Aug 2021 02:33:23 +1200 Subject: [PATCH] Prep for more handlers in action --- lib/src/action.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/action.rs b/lib/src/action.rs index c857d88e..34d9768b 100644 --- a/lib/src/action.rs +++ b/lib/src/action.rs @@ -147,7 +147,7 @@ pub async fn worker( ) -> Result<(), CriticalError> { let mut last = Instant::now(); let mut set = Vec::new(); - let mut handler = + let mut action_handler = { working.borrow().action_handler.take() }.ok_or(CriticalError::MissingHandler)?; let mut process: Option = None; @@ -184,11 +184,11 @@ pub async fn worker( if let Some(h) = working.borrow().action_handler.take() { trace!("action handler updated"); - handler = h; + action_handler = h; } let outcome = action.outcome.clone(); - let err = handler.handle(action).map_err(|e| rte("action worker", e)); + let err = action_handler.handle(action).map_err(|e| rte("action worker", e)); if let Err(err) = err { errors.send(err).await?; }