diff options
Diffstat (limited to 'crates/ra_db/src')
-rw-r--r-- | crates/ra_db/src/input.rs | 3 | ||||
-rw-r--r-- | crates/ra_db/src/mock.rs | 10 |
2 files changed, 2 insertions, 11 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index b09014dc6..9edaf36cf 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -5,8 +5,6 @@ use relative_path::RelativePathBuf; | |||
5 | use ra_syntax::SmolStr; | 5 | use ra_syntax::SmolStr; |
6 | use salsa; | 6 | use salsa; |
7 | 7 | ||
8 | use crate::file_resolver::FileResolverImp; | ||
9 | |||
10 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | 8 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
11 | pub struct FileId(pub u32); | 9 | pub struct FileId(pub u32); |
12 | 10 | ||
@@ -123,7 +121,6 @@ pub struct SourceRootId(pub u32); | |||
123 | 121 | ||
124 | #[derive(Default, Clone, Debug, PartialEq, Eq)] | 122 | #[derive(Default, Clone, Debug, PartialEq, Eq)] |
125 | pub struct SourceRoot { | 123 | pub struct SourceRoot { |
126 | pub file_resolver: FileResolverImp, | ||
127 | pub files: FxHashSet<FileId>, | 124 | pub files: FxHashSet<FileId>, |
128 | } | 125 | } |
129 | 126 | ||
diff --git a/crates/ra_db/src/mock.rs b/crates/ra_db/src/mock.rs index 2f7551597..14d9e79b5 100644 --- a/crates/ra_db/src/mock.rs +++ b/crates/ra_db/src/mock.rs | |||
@@ -1,9 +1,7 @@ | |||
1 | use std::sync::Arc; | ||
2 | |||
3 | use rustc_hash::FxHashSet; | 1 | use rustc_hash::FxHashSet; |
4 | use relative_path::{RelativePath, RelativePathBuf}; | 2 | use relative_path::{RelativePath, RelativePathBuf}; |
5 | 3 | ||
6 | use crate::{FileId, FileResolver, SourceRoot, FileResolverImp}; | 4 | use crate::{FileId, FileResolver, SourceRoot}; |
7 | 5 | ||
8 | #[derive(Default, Debug, Clone)] | 6 | #[derive(Default, Debug, Clone)] |
9 | pub struct FileMap(Vec<(FileId, RelativePathBuf)>); | 7 | pub struct FileMap(Vec<(FileId, RelativePathBuf)>); |
@@ -17,11 +15,7 @@ impl FileMap { | |||
17 | 15 | ||
18 | pub fn into_source_root(self) -> SourceRoot { | 16 | pub fn into_source_root(self) -> SourceRoot { |
19 | let files = self.files(); | 17 | let files = self.files(); |
20 | let file_resolver = FileResolverImp::new(Arc::new(self)); | 18 | SourceRoot { files } |
21 | SourceRoot { | ||
22 | file_resolver, | ||
23 | files, | ||
24 | } | ||
25 | } | 19 | } |
26 | 20 | ||
27 | pub fn files(&self) -> FxHashSet<FileId> { | 21 | pub fn files(&self) -> FxHashSet<FileId> { |