aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db/src/mock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_db/src/mock.rs')
-rw-r--r--crates/ra_db/src/mock.rs7
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 @@
1use rustc_hash::FxHashSet; 1use rustc_hash::FxHashSet;
2use relative_path::{RelativePath, RelativePathBuf}; 2use relative_path::{RelativePath, RelativePathBuf};
3 3
4use crate::{FileId, FileResolver, SourceRoot}; 4use crate::{FileId, FileResolver};
5 5
6#[derive(Default, Debug, Clone)] 6#[derive(Default, Debug, Clone)]
7pub struct FileMap(Vec<(FileId, RelativePathBuf)>); 7pub 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 }