mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Clean up a bit
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
pub struct BatchDatabase {
|
||||
runtime: salsa::Runtime<BatchDatabase>,
|
||||
interner: Arc<HirInterner>,
|
||||
// file_counter: u32,
|
||||
}
|
||||
|
||||
impl salsa::Database for BatchDatabase {
|
||||
@@ -83,7 +82,7 @@ pub fn load(crate_graph: CrateGraph, vfs: &mut Vfs) -> BatchDatabase {
|
||||
VfsChange::AddFile { .. }
|
||||
| VfsChange::RemoveFile { .. }
|
||||
| VfsChange::ChangeFile { .. } => {
|
||||
// log::warn!("VFS changed while loading");
|
||||
// We just need the first scan, so just ignore these
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,13 +162,6 @@ pub fn root2path(&self, root: VfsRoot) -> PathBuf {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user