From 1b44ec4f4c62196de64efea9e90cdd6a8da6a524 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Thu, 21 Mar 2024 00:11:24 -0400 Subject: [PATCH] reorg statusdb --- src/core/botmodules.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/botmodules.rs b/src/core/botmodules.rs index 746c673..8fdf96c 100644 --- a/src/core/botmodules.rs +++ b/src/core/botmodules.rs @@ -180,7 +180,8 @@ pub struct Routine {} pub struct ModulesManager { // statusdb: Arc>>>, - statusdb: Arc>>>, + // statusdb: Arc>>>, + statusdb: Arc)>>>, pub botactions: Arc>>>, } @@ -374,11 +375,11 @@ impl ModulesManager { let mut dbt = self.statusdb.write().await; // - let statusvector = dbt.entry((in_module.clone(),in_modgroup.clone())).or_insert(Vec::new()); + let statusvector = dbt.entry(in_module.clone()).or_insert((in_modgroup.clone(),Vec::new())); match in_modgroup { - ModGroup::Core => statusvector.push(StatusType::Enabled(StatusLvl::Instance)) , // Pushes the Module as Enabled at Instance Level - ModGroup::Custom => statusvector.push(StatusType::Disabled(StatusLvl::Instance)), + ModGroup::Core => statusvector.1.push(StatusType::Enabled(StatusLvl::Instance)) , // Pushes the Module as Enabled at Instance Level + ModGroup::Custom => statusvector.1.push(StatusType::Disabled(StatusLvl::Instance)), } // statusvector.push(ModStatusType::Enabled(StatusLvl::Instance)); // Pushes the Module as Enabled at Instance Level