diff --git a/core/lib.rs b/core/lib.rs index eda4e45db..db9c5bcf9 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -62,7 +62,6 @@ pub use io::{ }; use parking_lot::RwLock; use schema::Schema; -use std::ffi::CStr; use std::{ borrow::Cow, cell::{Cell, RefCell, UnsafeCell}, @@ -1839,20 +1838,24 @@ impl Connection { pub fn get_pager(&self) -> Rc { self.pager.borrow().clone() + } + pub fn get_used_vtab_mods(&self) -> std::collections::HashSet { - let mut mods = std::collections::HashSet::new(); + let mut mods: std::collections::HashSet = std::collections::HashSet::new(); let schema = self._db.schema.lock().unwrap(); - 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() + 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 {