diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-08 18:33:03 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-08 18:33:03 +0100 |
commit | 8aa10c00a4c5b957d459fac5a103cd9688e8dcdd (patch) | |
tree | 4b90fb312b32dd8431140f52265c44c580e0a588 /crates/ra_db | |
parent | a622a8e109e0f41f1b7cf869acb955eab8c95b43 (diff) | |
parent | dab7f3d2c6cd035f446fbdcda2442954da4afd3a (diff) |
Merge #5266
5266: Remove relative_path dependency r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db')
-rw-r--r-- | crates/ra_db/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_db/src/lib.rs | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml index ef85266db..889142442 100644 --- a/crates/ra_db/Cargo.toml +++ b/crates/ra_db/Cargo.toml | |||
@@ -9,7 +9,6 @@ doctest = false | |||
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | salsa = "0.15.0" | 11 | salsa = "0.15.0" |
12 | relative-path = "1.0.0" | ||
13 | rustc-hash = "1.1.0" | 12 | rustc-hash = "1.1.0" |
14 | 13 | ||
15 | ra_syntax = { path = "../ra_syntax" } | 14 | ra_syntax = { path = "../ra_syntax" } |
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 590efffa4..f25be24fe 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -16,9 +16,8 @@ pub use crate::{ | |||
16 | SourceRoot, SourceRootId, | 16 | SourceRoot, SourceRootId, |
17 | }, | 17 | }, |
18 | }; | 18 | }; |
19 | pub use relative_path::{RelativePath, RelativePathBuf}; | ||
20 | pub use salsa; | 19 | pub use salsa; |
21 | pub use vfs::{file_set::FileSet, AbsPathBuf, VfsPath}; | 20 | pub use vfs::{file_set::FileSet, VfsPath}; |
22 | 21 | ||
23 | #[macro_export] | 22 | #[macro_export] |
24 | macro_rules! impl_intern_key { | 23 | macro_rules! impl_intern_key { |
@@ -93,9 +92,9 @@ pub trait FileLoader { | |||
93 | fn file_text(&self, file_id: FileId) -> Arc<String>; | 92 | fn file_text(&self, file_id: FileId) -> Arc<String>; |
94 | /// Note that we intentionally accept a `&str` and not a `&Path` here. This | 93 | /// Note that we intentionally accept a `&str` and not a `&Path` here. This |
95 | /// method exists to handle `#[path = "/some/path.rs"] mod foo;` and such, | 94 | /// method exists to handle `#[path = "/some/path.rs"] mod foo;` and such, |
96 | /// so the input is guaranteed to be utf-8 string. We might introduce | 95 | /// so the input is guaranteed to be utf-8 string. One might be tempted to |
97 | /// `struct StrPath(str)` for clarity some day, but it's a bit messy, so we | 96 | /// introduce some kind of "utf-8 path with / separators", but that's a bad idea. Behold |
98 | /// get by with a `&str` for the time being. | 97 | /// `#[path = "C://no/way"]` |
99 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId>; | 98 | fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId>; |
100 | fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>>; | 99 | fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>>; |
101 | } | 100 | } |