Taking into account additional property names but not comparing their values.
This commit is contained in:
@@ -40,10 +40,36 @@ macro_rules! wasm_compare {
|
||||
}
|
||||
|
||||
{
|
||||
// Compare standard properties
|
||||
// Compare standard properties.
|
||||
result.extend(wasm_compare_standard_properties($source, $emacs, &$wasm.standard_properties)?)?;
|
||||
}
|
||||
|
||||
{
|
||||
// Compare additional properties.
|
||||
let additional_property_names: Vec<String> = $wasm.additional_properties.get_elisp_names().collect();
|
||||
for additional_property in additional_property_names.iter().map(String::as_str).map(EmacsField::Required) {
|
||||
match additional_property {
|
||||
EmacsField::Required(name) if emacs_keys.contains(name) => {
|
||||
emacs_keys.remove(name);
|
||||
}
|
||||
EmacsField::Optional(name) if emacs_keys.contains(name) => {
|
||||
emacs_keys.remove(name);
|
||||
}
|
||||
EmacsField::Required(name) => {
|
||||
result.status.push(WasmDiffStatus::Bad(
|
||||
format!(
|
||||
"Emacs node lacked required field ({name}).",
|
||||
name = name,
|
||||
)
|
||||
.into(),
|
||||
));
|
||||
}
|
||||
EmacsField::Optional(_name) => {}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Compare children.
|
||||
result.extend(wasm_compare_list(
|
||||
|
||||
Reference in New Issue
Block a user