diff options
author | Aleksey Kladov <[email protected]> | 2018-12-19 09:20:54 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-20 09:15:38 +0000 |
commit | 85290bc1342560d5560f0b2151cff1c0c6dac155 (patch) | |
tree | e7817987dc9dba9485659b8c2585e3c6315496c9 /crates/ra_db/src/mock.rs | |
parent | 815a0e577821a3876aa4c79c13200607acadcd2f (diff) |
switch analysis to vfs
Diffstat (limited to 'crates/ra_db/src/mock.rs')
-rw-r--r-- | crates/ra_db/src/mock.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_db/src/mock.rs b/crates/ra_db/src/mock.rs index 14d9e79b5..efe987bdd 100644 --- a/crates/ra_db/src/mock.rs +++ b/crates/ra_db/src/mock.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use rustc_hash::FxHashSet; | 1 | use rustc_hash::FxHashSet; |
2 | use relative_path::{RelativePath, RelativePathBuf}; | 2 | use relative_path::{RelativePath, RelativePathBuf}; |
3 | 3 | ||
4 | use crate::{FileId, FileResolver, SourceRoot}; | 4 | use crate::{FileId, FileResolver}; |
5 | 5 | ||
6 | #[derive(Default, Debug, Clone)] | 6 | #[derive(Default, Debug, Clone)] |
7 | pub struct FileMap(Vec<(FileId, RelativePathBuf)>); | 7 | pub struct FileMap(Vec<(FileId, RelativePathBuf)>); |
@@ -13,11 +13,6 @@ impl FileMap { | |||
13 | file_id | 13 | file_id |
14 | } | 14 | } |
15 | 15 | ||
16 | pub fn into_source_root(self) -> SourceRoot { | ||
17 | let files = self.files(); | ||
18 | SourceRoot { files } | ||
19 | } | ||
20 | |||
21 | pub fn files(&self) -> FxHashSet<FileId> { | 16 | pub fn files(&self) -> FxHashSet<FileId> { |
22 | self.iter().map(|(id, _)| id).collect() | 17 | self.iter().map(|(id, _)| id).collect() |
23 | } | 18 | } |