Fix clippy issues.
This commit is contained in:
@@ -29,11 +29,11 @@ intermediate!(
|
||||
let mut ret = Vec::new();
|
||||
|
||||
// Special case for list items with only paragraphs and sublists as their children. In those cases, the paragraph tags are omitted.
|
||||
let is_simple_list_item = original.children.iter().all(|child| match child {
|
||||
organic::types::Element::Paragraph(_) | organic::types::Element::PlainList(_) => {
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
let is_simple_list_item = original.children.iter().all(|child| {
|
||||
matches!(
|
||||
child,
|
||||
organic::types::Element::Paragraph(_) | organic::types::Element::PlainList(_)
|
||||
)
|
||||
});
|
||||
if is_simple_list_item {
|
||||
for elem in original.children.iter() {
|
||||
|
||||
Reference in New Issue
Block a user