pub struct BatchDatabase {
runtime: salsa::Runtime<BatchDatabase>,
interner: Arc<HirInterner>,
- // file_counter: u32,
}
impl salsa::Database for BatchDatabase {
VfsChange::AddFile { .. }
| VfsChange::RemoveFile { .. }
| VfsChange::ChangeFile { .. } => {
- // log::warn!("VFS changed while loading");
+ // We just need the first scan, so just ignore these
}
}
}
self.roots[root].root.clone()
}
- pub fn path2root(&self, path: &Path) -> Option<VfsRoot> {
- match self.find_root(path) {
- Some((root, _path, _file)) => Some(root),
- _ => None,
- }
- }
-
pub fn path2file(&self, path: &Path) -> Option<VfsFile> {
if let Some((_root, _path, Some(file))) = self.find_root(path) {
return Some(file);