From 4161f6877458b293d5d4237e445ec0212a20d0a4 Mon Sep 17 00:00:00 2001 From: Lucas Forato <63920674+lucasForato@users.noreply.github.com> Date: Thu, 7 Aug 2025 10:24:38 -0300 Subject: [PATCH] Update core/lib.rs Co-authored-by: bit-aloo <84662239+Shourya742@users.noreply.github.com> --- core/lib.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/lib.rs b/core/lib.rs index eb74d975f..eda4e45db 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -1843,15 +1843,16 @@ impl Connection { let mut mods = std::collections::HashSet::new(); let schema = self._db.schema.lock().unwrap(); - for table in schema.tables.values() { - if let Table::Virtual(vtab) = table.as_ref() { - if let Some(module_name) = vtab.module_name() { - mods.insert(module_name.to_string()); - } - } - } - mods + schema.tables.values() + .filter_map(|table| { + if let Table::Virtual(vtab) = table.as_ref() { + vtab.module_name().map(|name| name.to_string()) + } else { + None + } + }) + .collect() } pub fn get_query_only(&self) -> bool {