]> git.lizzy.rs Git - rust.git/commitdiff
Clean up a bit
authorFlorian Diebold <flodiebold@gmail.com>
Sun, 10 Feb 2019 10:48:59 +0000 (11:48 +0100)
committerFlorian Diebold <flodiebold@gmail.com>
Sun, 10 Feb 2019 10:48:59 +0000 (11:48 +0100)
crates/ra_batch/src/lib.rs
crates/ra_vfs/src/lib.rs

index c1cfb76bce2293f7f6a86cba184762eab7c4c8ac..837fff4dce5eec6661e3b9050651d2551c656399 100644 (file)
@@ -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
                     }
                 }
             }
index 2d861f832c5eefc34b923a432aad30a49a1caeb9..3805be570a694d5a0538adacf8f17490d358051c 100644 (file)
@@ -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);