aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-02-10 10:48:59 +0000
committerFlorian Diebold <[email protected]>2019-02-10 10:48:59 +0000
commitb18863f987ef14d44a67c0b8ebaa9c7a7fed7f59 (patch)
tree035c27557b40cc6102f4a4cafea401d5fe56a767 /crates
parent6f81a372db9e402126dcc36a725e9b1d71491955 (diff)
Clean up a bit
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_batch/src/lib.rs3
-rw-r--r--crates/ra_vfs/src/lib.rs7
2 files changed, 1 insertions, 9 deletions
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index c1cfb76bc..837fff4dc 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -22,7 +22,6 @@ type Result<T> = std::result::Result<T, failure::Error>;
22pub struct BatchDatabase { 22pub struct BatchDatabase {
23 runtime: salsa::Runtime<BatchDatabase>, 23 runtime: salsa::Runtime<BatchDatabase>,
24 interner: Arc<HirInterner>, 24 interner: Arc<HirInterner>,
25 // file_counter: u32,
26} 25}
27 26
28impl salsa::Database for BatchDatabase { 27impl salsa::Database for BatchDatabase {
@@ -83,7 +82,7 @@ impl BatchDatabase {
83 VfsChange::AddFile { .. } 82 VfsChange::AddFile { .. }
84 | VfsChange::RemoveFile { .. } 83 | VfsChange::RemoveFile { .. }
85 | VfsChange::ChangeFile { .. } => { 84 | VfsChange::ChangeFile { .. } => {
86 // log::warn!("VFS changed while loading"); 85 // We just need the first scan, so just ignore these
87 } 86 }
88 } 87 }
89 } 88 }
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs
index 2d861f832..3805be570 100644
--- a/crates/ra_vfs/src/lib.rs
+++ b/crates/ra_vfs/src/lib.rs
@@ -162,13 +162,6 @@ impl Vfs {
162 self.roots[root].root.clone() 162 self.roots[root].root.clone()
163 } 163 }
164 164
165 pub fn path2root(&self, path: &Path) -> Option<VfsRoot> {
166 match self.find_root(path) {
167 Some((root, _path, _file)) => Some(root),
168 _ => None,
169 }
170 }
171
172 pub fn path2file(&self, path: &Path) -> Option<VfsFile> { 165 pub fn path2file(&self, path: &Path) -> Option<VfsFile> {
173 if let Some((_root, _path, Some(file))) = self.find_root(path) { 166 if let Some((_root, _path, Some(file))) = self.find_root(path) {
174 return Some(file); 167 return Some(file);