aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-18 14:23:49 +0000
committerAleksey Kladov <[email protected]>2018-12-20 09:15:38 +0000
commitdea1a69e1cb0af7d6917d351a811ef205b7dfef9 (patch)
treec7658c00cd9d38a29722cf98d9c73088c979a456 /crates/ra_db
parentcb6205c09da9fd6fc0bd9f88106f5e9bd3f471aa (diff)
remove relpath from input
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/src/input.rs3
-rw-r--r--crates/ra_db/src/mock.rs10
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;
5use ra_syntax::SmolStr; 5use ra_syntax::SmolStr;
6use salsa; 6use salsa;
7 7
8use 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)]
11pub struct FileId(pub u32); 9pub 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)]
125pub struct SourceRoot { 123pub 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 @@
1use std::sync::Arc;
2
3use rustc_hash::FxHashSet; 1use rustc_hash::FxHashSet;
4use relative_path::{RelativePath, RelativePathBuf}; 2use relative_path::{RelativePath, RelativePathBuf};
5 3
6use crate::{FileId, FileResolver, SourceRoot, FileResolverImp}; 4use crate::{FileId, FileResolver, SourceRoot};
7 5
8#[derive(Default, Debug, Clone)] 6#[derive(Default, Debug, Clone)]
9pub struct FileMap(Vec<(FileId, RelativePathBuf)>); 7pub 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> {