Fix lifetimes in the compare functions.
This commit is contained in:
@@ -363,7 +363,33 @@ fn compare_ast_node<'b, 's>(
|
||||
AstNode::TableCell(_) => todo!(),
|
||||
AstNode::Timestamp(node) => compare_timestamp(source, emacs, node),
|
||||
};
|
||||
todo!()
|
||||
|
||||
let mut compare_result = match compare_result.unwrap_or_else(|e| {
|
||||
DiffResult {
|
||||
status: DiffStatus::Bad,
|
||||
name: "error!".into(),
|
||||
message: Some(e.to_string()),
|
||||
children: Vec::new(),
|
||||
rust_source: rust.get_standard_properties().get_source(),
|
||||
emacs_token: emacs,
|
||||
}
|
||||
.into()
|
||||
}) {
|
||||
DiffEntry::DiffResult(inner) => inner,
|
||||
DiffEntry::DiffLayer(_) => {
|
||||
unreachable!("Layers are only interior to DiffResults of AST nodes.")
|
||||
}
|
||||
};
|
||||
|
||||
match compare_standard_properties(source, emacs, &rust) {
|
||||
Err(err) => {
|
||||
compare_result.status = DiffStatus::Bad;
|
||||
compare_result.message = Some(err.to_string())
|
||||
}
|
||||
Ok(_) => {}
|
||||
}
|
||||
|
||||
Ok(compare_result.into())
|
||||
}
|
||||
|
||||
fn compare_element<'b, 's>(
|
||||
|
||||
Reference in New Issue
Block a user