mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 15:14:32 +00:00
remove nested match with and_then
This commit is contained in:
parent
f5d740aa3d
commit
9e5ff0dce7
1 changed files with 1 additions and 4 deletions
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue