Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs b/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs
index d714f63f11..953119fd1f 100644
--- a/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs
+++ b/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs
@@ -27,10 +27,7 @@ pub(crate) fn convert_comment_from_or_to_doc(
match comment.kind().doc {
Some(_) => doc_to_comment(acc, comment),
- None => match can_be_doc_comment(&comment) {
- Some(doc_comment_style) => comment_to_doc(acc, comment, doc_comment_style),
- None => None,
- },
+ None => can_be_doc_comment(&comment).and_then(|style| comment_to_doc(acc, comment, style)),
}
}