remove nested match with and_then
This commit is contained in:
parent
28399f9a80
commit
000713898c
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…
Add table
Add a link
Reference in a new issue