From c29f158c20ba57fc4a7067a493d79c38884ea1ec Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Wed, 7 Nov 2018 09:13:16 -0500 Subject: Rustfmt to pass CI --- crates/ra_editor/src/symbols.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'crates/ra_editor/src') diff --git a/crates/ra_editor/src/symbols.rs b/crates/ra_editor/src/symbols.rs index bf3ac6ff2..f7681c76f 100644 --- a/crates/ra_editor/src/symbols.rs +++ b/crates/ra_editor/src/symbols.rs @@ -24,12 +24,17 @@ pub struct FileSymbol { impl FileSymbol { pub fn docs(&self, file: &File) -> Option { - file.syntax().descendants() + file.syntax() + .descendants() .filter(|node| node.kind() == self.kind && node.range() == self.node_range) .filter_map(|node: SyntaxNodeRef| { fn doc_comments<'a, N: DocCommentsOwner<'a>>(node: N) -> Option { let comments = node.doc_comment_text(); - if comments.is_empty() { None } else { Some(comments) } + if comments.is_empty() { + None + } else { + Some(comments) + } } visitor() @@ -42,7 +47,8 @@ impl FileSymbol { .visit(doc_comments::) .visit(doc_comments::) .accept(node)? - }).nth(0) + }) + .nth(0) } } -- cgit v1.2.3