diff options
author | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
commit | 12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch) | |
tree | 71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_hir/src/code_model_impl/function.rs | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_hir/src/code_model_impl/function.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index 8326c02c7..b9438fdb7 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs | |||
@@ -25,10 +25,7 @@ impl FnSignature { | |||
25 | func: Function, | 25 | func: Function, |
26 | ) -> Arc<FnSignature> { | 26 | ) -> Arc<FnSignature> { |
27 | let (_, node) = func.source(db); | 27 | let (_, node) = func.source(db); |
28 | let name = node | 28 | let name = node.name().map(|n| n.as_name()).unwrap_or_else(Name::missing); |
29 | .name() | ||
30 | .map(|n| n.as_name()) | ||
31 | .unwrap_or_else(Name::missing); | ||
32 | let mut params = Vec::new(); | 29 | let mut params = Vec::new(); |
33 | let mut has_self_param = false; | 30 | let mut has_self_param = false; |
34 | if let Some(param_list) = node.param_list() { | 31 | if let Some(param_list) = node.param_list() { |
@@ -61,12 +58,7 @@ impl FnSignature { | |||
61 | TypeRef::unit() | 58 | TypeRef::unit() |
62 | }; | 59 | }; |
63 | 60 | ||
64 | let sig = FnSignature { | 61 | let sig = FnSignature { name, params, ret_type, has_self_param }; |
65 | name, | ||
66 | params, | ||
67 | ret_type, | ||
68 | has_self_param, | ||
69 | }; | ||
70 | Arc::new(sig) | 62 | Arc::new(sig) |
71 | } | 63 | } |
72 | } | 64 | } |