diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 15:50:47 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 15:50:47 +0000 |
commit | 7c977a7dcd2bac3b6148f2428bcb586c6354d775 (patch) | |
tree | 6ea2db9840f91aa39b65680ace9d3079a140a12c /crates/ra_hir/src/code_model_impl | |
parent | 05149d353299b54476410daeda6551e1261128ef (diff) | |
parent | f1367e0370d5de5cba13c853c7df5f0c5a0edf59 (diff) |
Merge #552
552: remove Cancelable from navigation target r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/module.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs index 8668d6c8a..331b0500e 100644 --- a/crates/ra_hir/src/code_model_impl/module.rs +++ b/crates/ra_hir/src/code_model_impl/module.rs | |||
@@ -148,13 +148,13 @@ impl Module { | |||
148 | } else { | 148 | } else { |
149 | return Ok(PerNs::none()); | 149 | return Ok(PerNs::none()); |
150 | }; | 150 | }; |
151 | let module = match curr.resolve(db)? { | 151 | let module = match curr.resolve(db) { |
152 | Def::Module(it) => it, | 152 | Def::Module(it) => it, |
153 | Def::Enum(e) => { | 153 | Def::Enum(e) => { |
154 | if segments.len() == idx + 1 { | 154 | if segments.len() == idx + 1 { |
155 | // enum variant | 155 | // enum variant |
156 | let matching_variant = | 156 | let matching_variant = |
157 | e.variants(db)?.into_iter().find(|(n, _variant)| n == name); | 157 | e.variants(db).into_iter().find(|(n, _variant)| n == name); |
158 | 158 | ||
159 | if let Some((_n, variant)) = matching_variant { | 159 | if let Some((_n, variant)) = matching_variant { |
160 | return Ok(PerNs::both(variant.def_id(), e.def_id())); | 160 | return Ok(PerNs::both(variant.def_id(), e.def_id())); |