remove relpath from input

This commit is contained in:
Aleksey Kladov 2018-12-18 17:23:49 +03:00
parent cb6205c09d
commit dea1a69e1c
2 changed files with 2 additions and 11 deletions

View File

@ -5,8 +5,6 @@
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 @@ fn crate_graph() -> Arc<CrateGraph> {
#[derive(Default, Clone, Debug, PartialEq, Eq)]
pub struct SourceRoot {
pub file_resolver: FileResolverImp,
pub files: FxHashSet<FileId>,
}

View File

@ -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 @@ pub fn add(&mut self, path: RelativePathBuf) -> FileId {
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<FileId> {