aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-27 09:40:57 +0000
committerGitHub <[email protected]>2019-10-27 09:40:57 +0000
commit7dfbe28211910d5d7c74a593bf0007c5db3e3496 (patch)
tree85231799bdc84bcd43ceceee08fe7714a9f21faa /crates/ra_db
parent5a3d2332f8d5e382fc06210c260ff6db857ac716 (diff)
parent8464c45086ee0f5e40a4c9e5e4a76cdfeb3a1ad2 (diff)
Merge #2087
2087: remove relative_path_buf workaround r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/src/lib.rs5
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 };