diff options
Diffstat (limited to 'crates/ra_lsp_server/src/path_map.rs')
-rw-r--r-- | crates/ra_lsp_server/src/path_map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/path_map.rs b/crates/ra_lsp_server/src/path_map.rs index a624043d8..02e54629c 100644 --- a/crates/ra_lsp_server/src/path_map.rs +++ b/crates/ra_lsp_server/src/path_map.rs | |||
@@ -43,7 +43,7 @@ impl PathMap { | |||
43 | (inserted, file_id) | 43 | (inserted, file_id) |
44 | } | 44 | } |
45 | pub fn get_id(&self, path: &Path) -> Option<FileId> { | 45 | pub fn get_id(&self, path: &Path) -> Option<FileId> { |
46 | self.path2id.get(path).map(|&id| id) | 46 | self.path2id.get(path).cloned() |
47 | } | 47 | } |
48 | pub fn get_path(&self, file_id: FileId) -> &Path { | 48 | pub fn get_path(&self, file_id: FileId) -> &Path { |
49 | self.id2path.get(&file_id).unwrap().as_path() | 49 | self.id2path.get(&file_id).unwrap().as_path() |