diff options
author | Aleksey Kladov <[email protected]> | 2019-10-27 09:36:40 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-27 09:36:40 +0000 |
commit | 8464c45086ee0f5e40a4c9e5e4a76cdfeb3a1ad2 (patch) | |
tree | 85231799bdc84bcd43ceceee08fe7714a9f21faa /crates/ra_db | |
parent | da5528824a836a4f36f44f90adc9fadcc98ca75b (diff) |
remove relative_path_buf workaround
The upstream problem was fixed with the change to 1.0
Diffstat (limited to 'crates/ra_db')
-rw-r--r-- | crates/ra_db/src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index fc5d6d396..0d1ab4843 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -134,10 +134,7 @@ impl<T: SourceDatabaseExt> FileLoader for FileLoaderDelegate<&'_ T> { | |||
134 | ) -> Option<FileId> { | 134 | ) -> Option<FileId> { |
135 | let path = { | 135 | let path = { |
136 | let mut path = self.0.file_relative_path(anchor); | 136 | let mut path = self.0.file_relative_path(anchor); |
137 | // Workaround for relative path API: turn `lib.rs` into ``. | 137 | assert!(path.pop()); |
138 | if !path.pop() { | ||
139 | path = RelativePathBuf::default(); | ||
140 | } | ||
141 | path.push(relative_path); | 138 | path.push(relative_path); |
142 | path.normalize() | 139 | path.normalize() |
143 | }; | 140 | }; |