From 12e3b4c70b5ef23b2fdfc197296d483680e125f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 8 Feb 2019 14:49:43 +0300 Subject: reformat the world --- crates/ra_ide_api_light/src/formatting.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/ra_ide_api_light/src/formatting.rs') 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 { } fn prev_leaf(node: &SyntaxNode) -> Option<&SyntaxNode> { - generate(node.ancestors().find_map(SyntaxNode::prev_sibling), |it| { - it.last_child() - }) - .last() + generate(node.ancestors().find_map(SyntaxNode::prev_sibling), |it| it.last_child()).last() } pub fn extract_trivial_expression(block: &ast::Block) -> Option<&ast::Expr> { -- cgit v1.2.3