Clean up a bit

This commit is contained in:
Florian Diebold 2019-02-10 11:48:59 +01:00
parent 6f81a372db
commit b18863f987
2 changed files with 1 additions and 9 deletions

View file

@ -22,7 +22,6 @@ type Result<T> = std::result::Result<T, failure::Error>;
pub struct BatchDatabase { pub struct BatchDatabase {
runtime: salsa::Runtime<BatchDatabase>, runtime: salsa::Runtime<BatchDatabase>,
interner: Arc<HirInterner>, interner: Arc<HirInterner>,
// file_counter: u32,
} }
impl salsa::Database for BatchDatabase { impl salsa::Database for BatchDatabase {
@ -83,7 +82,7 @@ impl BatchDatabase {
VfsChange::AddFile { .. } VfsChange::AddFile { .. }
| VfsChange::RemoveFile { .. } | VfsChange::RemoveFile { .. }
| VfsChange::ChangeFile { .. } => { | VfsChange::ChangeFile { .. } => {
// log::warn!("VFS changed while loading"); // We just need the first scan, so just ignore these
} }
} }
} }

View file

@ -162,13 +162,6 @@ impl Vfs {
self.roots[root].root.clone() 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> { pub fn path2file(&self, path: &Path) -> Option<VfsFile> {
if let Some((_root, _path, Some(file))) = self.find_root(path) { if let Some((_root, _path, Some(file))) = self.find_root(path) {
return Some(file); return Some(file);