Add a default case for tokens which do not have any expected properties except for :standard-properties.

This commit is contained in:
Tom Alexander
2023-10-06 13:45:19 -04:00
parent 45dd38ac2d
commit ae11e390d1
2 changed files with 57 additions and 3 deletions

View File

@@ -2575,9 +2575,14 @@ fn compare_bold<'b, 's>(
rust: &'b Bold<'s>,
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
let children = emacs.as_list()?;
let this_status = DiffStatus::Good;
let mut this_status = DiffStatus::Good;
let mut child_status = Vec::new();
let message = None;
let mut message = None;
if let Some((new_status, new_message)) = compare_properties!(emacs)? {
this_status = new_status;
message = new_message;
}
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {
child_status.push(compare_ast_node(source, emacs_child, rust_child.into())?);