aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_impl
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 15:50:47 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 15:50:47 +0000
commit7c977a7dcd2bac3b6148f2428bcb586c6354d775 (patch)
tree6ea2db9840f91aa39b65680ace9d3079a140a12c /crates/ra_hir/src/code_model_impl
parent05149d353299b54476410daeda6551e1261128ef (diff)
parentf1367e0370d5de5cba13c853c7df5f0c5a0edf59 (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.rs4
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()));