diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-26 15:37:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-26 15:37:15 +0100 |
commit | 4f60b4f2a32190830215defe6cf81836f34d99c9 (patch) | |
tree | 008a5cf106fd62a65b1931cf340cf058a838be5d /crates/rust-analyzer/src/global_state.rs | |
parent | ce06f8d0416d5851264769eb9583ce43d66f0474 (diff) | |
parent | 72fe70f2f8aee9556166ba0f984a29d19a485e61 (diff) |
Merge #5076
5076: Make VFS join methods fallible r=matklad a=jonas-schievink
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/rust-analyzer/src/global_state.rs')
-rw-r--r-- | crates/rust-analyzer/src/global_state.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs index 4da094083..f224c69e7 100644 --- a/crates/rust-analyzer/src/global_state.rs +++ b/crates/rust-analyzer/src/global_state.rs | |||
@@ -209,7 +209,7 @@ impl GlobalStateSnapshot { | |||
209 | pub(crate) fn anchored_path(&self, file_id: FileId, path: &str) -> Url { | 209 | pub(crate) fn anchored_path(&self, file_id: FileId, path: &str) -> Url { |
210 | let mut base = self.vfs.read().0.file_path(file_id); | 210 | let mut base = self.vfs.read().0.file_path(file_id); |
211 | base.pop(); | 211 | base.pop(); |
212 | let path = base.join(path); | 212 | let path = base.join(path).unwrap(); |
213 | let path = path.as_path().unwrap(); | 213 | let path = path.as_path().unwrap(); |
214 | url_from_abs_path(&path) | 214 | url_from_abs_path(&path) |
215 | } | 215 | } |