wildcard all the other variants

This commit is contained in:
Michael Zhang 2021-07-06 13:26:38 -05:00
parent 156582dde6
commit 2f1be1bc80
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B

View file

@ -53,16 +53,12 @@ fn visit_ast<'a, W: Write>(opt: &Opt, out: &mut W, node: &'a AstNode<'a>) -> Res
out.write(&code_block.literal)?; out.write(&code_block.literal)?;
} }
} }
NodeValue::List(_) | NodeValue::Item(_) | NodeValue::Document => { _ => {
// recurse // recurse
for child in node.children() { for child in node.children() {
visit_ast(opt, out, child)?; visit_ast(opt, out, child)?;
} }
} }
NodeValue::Heading(_) | NodeValue::BlockQuote | NodeValue::Paragraph => {
// don't do anything
}
_ => todo!("unsupported type {:?}", ast.value),
} }
Ok(()) Ok(())