Compare Document additional properties.
This commit is contained in:
parent
d965dd6fd1
commit
3fcf1b3864
@ -455,6 +455,27 @@ fn _compare_document<'b, 's>(
|
||||
let mut child_status = Vec::new();
|
||||
let mut message = None;
|
||||
|
||||
let additional_property_names: Vec<String> = rust
|
||||
.get_additional_properties()
|
||||
.map(|node_property| format!(":{}", node_property.property_name.to_uppercase()))
|
||||
.collect();
|
||||
|
||||
let additional_properties: Vec<(String, &str)> = rust
|
||||
.get_additional_properties()
|
||||
.map(|node_property| {
|
||||
(
|
||||
format!(":{}", node_property.property_name.to_uppercase()),
|
||||
node_property.value.unwrap_or(""),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
compare_additional_properties(emacs, additional_properties.into_iter())?.apply(
|
||||
&mut child_status,
|
||||
&mut this_status,
|
||||
&mut message,
|
||||
);
|
||||
|
||||
compare_children_iter(
|
||||
source,
|
||||
emacs,
|
||||
@ -468,6 +489,10 @@ fn _compare_document<'b, 's>(
|
||||
source,
|
||||
emacs,
|
||||
rust,
|
||||
additional_property_names
|
||||
.iter()
|
||||
.map(String::as_str)
|
||||
.map(EmacsField::Required),
|
||||
(
|
||||
EmacsField::Required(":path"),
|
||||
|r| r.path.as_ref().map(|p| p.to_str()).flatten(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user