Make VFS join methods fallible

This commit is contained in:
Jonas Schievink 2020-06-26 16:25:08 +02:00
parent 38cd1b70e8
commit 72fe70f2f8
4 changed files with 27 additions and 9 deletions

View file

@ -213,7 +213,7 @@ impl GlobalStateSnapshot {
pub(crate) fn anchored_path(&self, file_id: FileId, path: &str) -> Url {
let mut base = self.vfs.read().0.file_path(file_id);
base.pop();
let path = base.join(path);
let path = base.join(path).unwrap();
let path = path.as_path().unwrap();
url_from_abs_path(&path)
}