Skip to content

Commit a9df487

Browse files
committed
Rustfmt to pass CI
1 parent 58092b6 commit a9df487

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

crates/ra_analysis/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl Analysis {
261261
pub fn doc_comment_for(
262262
&self,
263263
file_id: FileId,
264-
symbol: FileSymbol
264+
symbol: FileSymbol,
265265
) -> Cancelable<Option<String>> {
266266
self.imp.doc_comment_for(file_id, symbol)
267267
}

crates/ra_editor/src/symbols.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ pub struct FileSymbol {
2424

2525
impl FileSymbol {
2626
pub fn docs(&self, file: &File) -> Option<String> {
27-
file.syntax().descendants()
27+
file.syntax()
28+
.descendants()
2829
.filter(|node| node.kind() == self.kind && node.range() == self.node_range)
2930
.filter_map(|node: SyntaxNodeRef| {
3031
fn doc_comments<'a, N: DocCommentsOwner<'a>>(node: N) -> Option<String> {
3132
let comments = node.doc_comment_text();
32-
if comments.is_empty() { None } else { Some(comments) }
33+
if comments.is_empty() {
34+
None
35+
} else {
36+
Some(comments)
37+
}
3338
}
3439

3540
visitor()
@@ -42,7 +47,8 @@ impl FileSymbol {
4247
.visit(doc_comments::<ast::ConstDef>)
4348
.visit(doc_comments::<ast::StaticDef>)
4449
.accept(node)?
45-
}).nth(0)
50+
})
51+
.nth(0)
4652
}
4753
}
4854

crates/ra_lsp_server/src/main_loop/handlers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ pub fn handle_hover(
494494

495495
return Ok(Some(Hover {
496496
contents,
497-
range: Some(range)
498-
}))
497+
range: Some(range),
498+
}));
499499
}
500500
}
501501

0 commit comments

Comments
 (0)