Skip to content

Commit b8e8895

Browse files
committed
fmt
1 parent 6b102df commit b8e8895

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

src/comment.rs

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -367,22 +367,27 @@ fn identify_comment(
367367
if rest.is_empty() {
368368
Some(rewritten_first_group)
369369
} else {
370-
identify_comment(rest.trim_start(), block_style, shape, config, is_doc_comment).map(
371-
|rest_str| {
372-
format!(
373-
"{}\n{}{}{}",
374-
rewritten_first_group,
375-
// insert back the blank line
376-
if has_bare_lines && style.is_line_comment() {
377-
"\n"
378-
} else {
379-
""
380-
},
381-
shape.indent.to_string(config),
382-
rest_str
383-
)
384-
},
370+
identify_comment(
371+
rest.trim_start(),
372+
block_style,
373+
shape,
374+
config,
375+
is_doc_comment,
385376
)
377+
.map(|rest_str| {
378+
format!(
379+
"{}\n{}{}{}",
380+
rewritten_first_group,
381+
// insert back the blank line
382+
if has_bare_lines && style.is_line_comment() {
383+
"\n"
384+
} else {
385+
""
386+
},
387+
shape.indent.to_string(config),
388+
rest_str
389+
)
390+
})
386391
}
387392
}
388393

0 commit comments

Comments
 (0)