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_light/src/formatting.rs | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_ide_api_light/src/formatting.rs')
-rw-r--r-- | crates/ra_ide_api_light/src/formatting.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide_api_light/src/formatting.rs b/crates/ra_ide_api_light/src/formatting.rs index 46ffa7d96..8bc03f974 100644 --- a/crates/ra_ide_api_light/src/formatting.rs +++ b/crates/ra_ide_api_light/src/formatting.rs | |||
@@ -32,10 +32,7 @@ fn prev_leaves(node: &SyntaxNode) -> impl Iterator<Item = &SyntaxNode> { | |||
32 | } | 32 | } |
33 | 33 | ||
34 | fn prev_leaf(node: &SyntaxNode) -> Option<&SyntaxNode> { | 34 | fn prev_leaf(node: &SyntaxNode) -> Option<&SyntaxNode> { |
35 | generate(node.ancestors().find_map(SyntaxNode::prev_sibling), |it| { | 35 | generate(node.ancestors().find_map(SyntaxNode::prev_sibling), |it| it.last_child()).last() |
36 | it.last_child() | ||
37 | }) | ||
38 | .last() | ||
39 | } | 36 | } |
40 | 37 | ||
41 | pub fn extract_trivial_expression(block: &ast::Block) -> Option<&ast::Expr> { | 38 | pub fn extract_trivial_expression(block: &ast::Block) -> Option<&ast::Expr> { |