diff options
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/path_map.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/path_map.rs b/crates/ra_lsp_server/src/path_map.rs index b3d1dc3db..d5957d673 100644 --- a/crates/ra_lsp_server/src/path_map.rs +++ b/crates/ra_lsp_server/src/path_map.rs | |||
@@ -1,4 +1,7 @@ | |||
1 | use std::path::{Component, Path, PathBuf}; | 1 | use std::{ |
2 | fmt, | ||
3 | path::{Component, Path, PathBuf}, | ||
4 | }; | ||
2 | 5 | ||
3 | use im; | 6 | use im; |
4 | use ra_analysis::{FileId, FileResolver}; | 7 | use ra_analysis::{FileId, FileResolver}; |
@@ -10,7 +13,7 @@ pub enum Root { | |||
10 | Lib, | 13 | Lib, |
11 | } | 14 | } |
12 | 15 | ||
13 | #[derive(Debug, Default, Clone)] | 16 | #[derive(Default, Clone)] |
14 | pub struct PathMap { | 17 | pub struct PathMap { |
15 | next_id: u32, | 18 | next_id: u32, |
16 | path2id: im::HashMap<PathBuf, FileId>, | 19 | path2id: im::HashMap<PathBuf, FileId>, |
@@ -18,6 +21,12 @@ pub struct PathMap { | |||
18 | id2root: im::HashMap<FileId, Root>, | 21 | id2root: im::HashMap<FileId, Root>, |
19 | } | 22 | } |
20 | 23 | ||
24 | impl fmt::Debug for PathMap { | ||
25 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
26 | f.write_str("PathMap { ... }") | ||
27 | } | ||
28 | } | ||
29 | |||
21 | impl PathMap { | 30 | impl PathMap { |
22 | pub fn new() -> PathMap { | 31 | pub fn new() -> PathMap { |
23 | Default::default() | 32 | Default::default() |