aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/path_map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/path_map.rs')
-rw-r--r--crates/ra_lsp_server/src/path_map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/path_map.rs b/crates/ra_lsp_server/src/path_map.rs
index a624043d8..33babda4b 100644
--- a/crates/ra_lsp_server/src/path_map.rs
+++ b/crates/ra_lsp_server/src/path_map.rs
@@ -33,7 +33,7 @@ impl PathMap {
33 let file_id = self 33 let file_id = self
34 .path2id 34 .path2id
35 .get(path.as_path()) 35 .get(path.as_path())
36 .map(|&id| id) 36 .cloned()
37 .unwrap_or_else(|| { 37 .unwrap_or_else(|| {
38 inserted = true; 38 inserted = true;
39 let id = self.new_file_id(); 39 let id = self.new_file_id();
@@ -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()