Compare properties for export snippets.
This commit is contained in:
parent
8dde8ce4e1
commit
00ed63dcaa
@ -3217,10 +3217,26 @@ fn compare_export_snippet<'b, 's>(
|
|||||||
emacs: &'b Token<'s>,
|
emacs: &'b Token<'s>,
|
||||||
rust: &'b ExportSnippet<'s>,
|
rust: &'b ExportSnippet<'s>,
|
||||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||||
let this_status = DiffStatus::Good;
|
let mut this_status = DiffStatus::Good;
|
||||||
let message = None;
|
let mut message = None;
|
||||||
|
|
||||||
// TODO: Compare :back-end :value
|
if let Some((new_status, new_message)) = compare_properties!(
|
||||||
|
emacs,
|
||||||
|
rust,
|
||||||
|
(
|
||||||
|
EmacsField::Required(":back-end"),
|
||||||
|
|r| Some(r.backend),
|
||||||
|
compare_property_quoted_string
|
||||||
|
),
|
||||||
|
(
|
||||||
|
EmacsField::Required(":value"),
|
||||||
|
|r| r.contents,
|
||||||
|
compare_property_quoted_string
|
||||||
|
)
|
||||||
|
)? {
|
||||||
|
this_status = new_status;
|
||||||
|
message = new_message;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(DiffResult {
|
Ok(DiffResult {
|
||||||
status: this_status,
|
status: this_status,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user