From dea1a69e1cb0af7d6917d351a811ef205b7dfef9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Dec 2018 17:23:49 +0300 Subject: remove relpath from input --- crates/ra_db/src/input.rs | 3 --- crates/ra_db/src/mock.rs | 10 ++-------- 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'crates/ra_db') 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; use ra_syntax::SmolStr; use salsa; -use crate::file_resolver::FileResolverImp; - #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct FileId(pub u32); @@ -123,7 +121,6 @@ pub struct SourceRootId(pub u32); #[derive(Default, Clone, Debug, PartialEq, Eq)] pub struct SourceRoot { - pub file_resolver: FileResolverImp, pub files: FxHashSet, } 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 @@ -use std::sync::Arc; - use rustc_hash::FxHashSet; use relative_path::{RelativePath, RelativePathBuf}; -use crate::{FileId, FileResolver, SourceRoot, FileResolverImp}; +use crate::{FileId, FileResolver, SourceRoot}; #[derive(Default, Debug, Clone)] pub struct FileMap(Vec<(FileId, RelativePathBuf)>); @@ -17,11 +15,7 @@ impl FileMap { pub fn into_source_root(self) -> SourceRoot { let files = self.files(); - let file_resolver = FileResolverImp::new(Arc::new(self)); - SourceRoot { - file_resolver, - files, - } + SourceRoot { files } } pub fn files(&self) -> FxHashSet { -- cgit v1.2.3