From 089b1c57c1774eb1aacec53828ce2d2648adff2d Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Sat, 26 Jan 2019 12:06:41 +0100 Subject: Address some issues flagged in review --- crates/ra_hir/src/code_model_impl/function.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir/src/code_model_impl') diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index f4beab6ae..e0dd4d629 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs @@ -32,7 +32,7 @@ impl FnSignature { .name() .map(|n| n.as_name()) .unwrap_or_else(Name::missing); - let mut args = Vec::new(); + let mut params = Vec::new(); let mut has_self_param = false; if let Some(param_list) = node.param_list() { if let Some(self_param) = param_list.self_param() { @@ -50,15 +50,14 @@ impl FnSignature { } } }; - args.push(self_type); + params.push(self_type); has_self_param = true; } for param in param_list.params() { let type_ref = TypeRef::from_ast_opt(param.type_ref()); - args.push(type_ref); + params.push(type_ref); } } - let type_params = db.generic_params(func.into()); let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) { TypeRef::from_ast(type_ref) } else { @@ -67,8 +66,7 @@ impl FnSignature { let sig = FnSignature { name, - type_params, - args, + params, ret_type, has_self_param, }; -- cgit v1.2.3