From 772acb53f2d7568ff1cc2ba4ca84a47110f13b3a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 25 Oct 2018 16:25:24 +0300 Subject: use correct file when resolving callables --- crates/ra_lsp_server/src/path_map.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'crates/ra_lsp_server/src/path_map.rs') 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 @@ -use std::path::{Component, Path, PathBuf}; +use std::{ + fmt, + path::{Component, Path, PathBuf}, +}; use im; use ra_analysis::{FileId, FileResolver}; @@ -10,7 +13,7 @@ pub enum Root { Lib, } -#[derive(Debug, Default, Clone)] +#[derive(Default, Clone)] pub struct PathMap { next_id: u32, path2id: im::HashMap, @@ -18,6 +21,12 @@ pub struct PathMap { id2root: im::HashMap, } +impl fmt::Debug for PathMap { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str("PathMap { ... }") + } +} + impl PathMap { pub fn new() -> PathMap { Default::default() -- cgit v1.2.3