Switch to more generic implementation.

This commit is contained in:
Tom Alexander
2023-10-06 16:03:41 -04:00
parent 3da52a0826
commit c7dbe596b3
3 changed files with 11 additions and 33 deletions

View File

@@ -3,6 +3,7 @@ use std::borrow::Cow;
use std::collections::BTreeSet;
use std::collections::HashSet;
use super::compare_field::compare_property_quoted_string;
use super::compare_field::compare_property_quoted_string_required_value;
use super::elisp_fact::ElispFact;
use super::elisp_fact::GetElispFact;
@@ -2659,9 +2660,10 @@ fn compare_verbatim<'b, 's>(
if let Some((new_status, new_message)) = compare_properties!(
emacs,
rust,
EmacsField::Required(":value"),
rust.contents,
compare_property_quoted_string_required_value
|r| Some(r.contents),
compare_property_quoted_string
)? {
this_status = new_status;
message = new_message;
@@ -2688,9 +2690,10 @@ fn compare_code<'b, 's>(
if let Some((new_status, new_message)) = compare_properties!(
emacs,
rust,
EmacsField::Required(":value"),
rust.contents,
compare_property_quoted_string_required_value
|r| Some(r.contents),
compare_property_quoted_string
)? {
this_status = new_status;
message = new_message;