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_ide_api/src/completion/complete_fn_param.rs | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_fn_param.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_fn_param.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_fn_param.rs b/crates/ra_ide_api/src/completion/complete_fn_param.rs index 8d4df4ea1..43532226f 100644 --- a/crates/ra_ide_api/src/completion/complete_fn_param.rs +++ b/crates/ra_ide_api/src/completion/complete_fn_param.rs | |||
@@ -43,13 +43,12 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext) | |||
43 | node: &'a N, | 43 | node: &'a N, |
44 | params: &mut FxHashMap<String, (u32, &'a ast::Param)>, | 44 | params: &mut FxHashMap<String, (u32, &'a ast::Param)>, |
45 | ) { | 45 | ) { |
46 | node.functions() | 46 | node.functions().filter_map(|it| it.param_list()).flat_map(|it| it.params()).for_each( |
47 | .filter_map(|it| it.param_list()) | 47 | |param| { |
48 | .flat_map(|it| it.params()) | ||
49 | .for_each(|param| { | ||
50 | let text = param.syntax().text().to_string(); | 48 | let text = param.syntax().text().to_string(); |
51 | params.entry(text).or_insert((0, param)).0 += 1; | 49 | params.entry(text).or_insert((0, param)).0 += 1; |
52 | }) | 50 | }, |
51 | ) | ||
53 | } | 52 | } |
54 | } | 53 | } |
55 | 54 | ||