mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Make VFS join methods fallible
This commit is contained in:
parent
38cd1b70e8
commit
72fe70f2f8
4 changed files with 27 additions and 9 deletions
|
@ -18,7 +18,7 @@ impl FileSet {
|
|||
pub fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId> {
|
||||
let mut base = self.paths[&anchor].clone();
|
||||
base.pop();
|
||||
let path = base.join(path);
|
||||
let path = base.join(path)?;
|
||||
let res = self.files.get(&path).copied();
|
||||
res
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue