remove relpath from input
This commit is contained in:
parent
cb6205c09d
commit
dea1a69e1c
@ -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>,
|
||||
}
|
||||
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user