aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/path_map.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-11-30 14:40:26 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-11-30 14:40:26 +0000
commit714f6afb3256516657a4be54e8b0f1add6efc801 (patch)
tree9748b1583dd0d6ffded780fc597857dd8dd2dec3 /crates/ra_lsp_server/src/path_map.rs
parent70a7cb34ec18d30a680a73727e1d87a0a786dc44 (diff)
parentab7843c2d1387b2c5be63a914512f79a0be86cac (diff)
Merge #251
251: Clippy lints r=matklad a=kjeremy Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/path_map.rs')
-rw-r--r--crates/ra_lsp_server/src/path_map.rs2
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()