diff options
author | Aleksey Kladov <[email protected]> | 2019-11-27 18:44:38 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-27 18:44:38 +0000 |
commit | 27b362b05910c81fd5b28f6cd5d2c075311032f9 (patch) | |
tree | 4c059427819ef442c785125f48fe83f81f6d667a /crates/ra_hir/src | |
parent | 757e593b253b4df7e6fc8bf15a4d4f34c9d484c5 (diff) |
Reformat
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/from_source.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs index 7756ca80e..9f7c22b21 100644 --- a/crates/ra_hir/src/from_source.rs +++ b/crates/ra_hir/src/from_source.rs | |||
@@ -262,12 +262,11 @@ impl Module { | |||
262 | 262 | ||
263 | let original_file = src.file_id.original_file(db); | 263 | let original_file = src.file_id.original_file(db); |
264 | 264 | ||
265 | let (krate, local_id) = | 265 | let (krate, local_id) = db.relevant_crates(original_file).iter().find_map(|&crate_id| { |
266 | db.relevant_crates(original_file).iter().find_map(|&crate_id| { | 266 | let crate_def_map = db.crate_def_map(crate_id); |
267 | let crate_def_map = db.crate_def_map(crate_id); | 267 | let local_id = crate_def_map.modules_for_file(original_file).next()?; |
268 | let local_id = crate_def_map.modules_for_file(original_file).next()?; | 268 | Some((crate_id, local_id)) |
269 | Some((crate_id, local_id)) | 269 | })?; |
270 | })?; | ||
271 | Some(Module { id: ModuleId { krate, local_id } }) | 270 | Some(Module { id: ModuleId { krate, local_id } }) |
272 | } | 271 | } |
273 | } | 272 | } |