Merge branch 'drawer_properties'
This commit is contained in:
commit
60bec4695b
@ -1241,9 +1241,19 @@ fn compare_drawer<'b, 's>(
|
|||||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||||
let children = emacs.as_list()?;
|
let children = emacs.as_list()?;
|
||||||
let mut child_status = Vec::new();
|
let mut child_status = Vec::new();
|
||||||
let this_status = DiffStatus::Good;
|
let mut this_status = DiffStatus::Good;
|
||||||
let message = None;
|
let mut message = None;
|
||||||
// TODO: Compare :drawer-name
|
|
||||||
|
// Compare drawer-name
|
||||||
|
let name =
|
||||||
|
get_property_quoted_string(emacs, ":drawer-name")?.ok_or("Drawers should have a name.")?;
|
||||||
|
if name != rust.name {
|
||||||
|
this_status = DiffStatus::Bad;
|
||||||
|
message = Some(format!(
|
||||||
|
"Name mismatch (emacs != rust) {:?} != {:?}",
|
||||||
|
name, rust.name
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {
|
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())?);
|
child_status.push(compare_ast_node(source, emacs_child, rust_child.into())?);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user