Remove the GetStandardProperties trait.
This was using dynamic dispatch to deal with enums to avoid the repetitive typing.
This commit is contained in:
@@ -15,7 +15,6 @@ use crate::compare::sexp::unquote;
|
||||
use crate::types::AffiliatedKeywordValue;
|
||||
use crate::types::AstNode;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::types::GetStandardProperties;
|
||||
use crate::types::StandardProperties;
|
||||
|
||||
/// Check if the child string slice is a slice of the parent string slice.
|
||||
@@ -44,14 +43,14 @@ fn get_rust_byte_offsets<'b, 's, S: StandardProperties<'s> + ?Sized>(
|
||||
pub(crate) fn compare_standard_properties<
|
||||
'b,
|
||||
's,
|
||||
S: GetStandardProperties<'s> + GetElispFact<'s> + ?Sized,
|
||||
S: StandardProperties<'s> + GetElispFact<'s> + ?Sized,
|
||||
>(
|
||||
original_document: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
rust: &'b S,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
assert_name(emacs, rust.get_elisp_fact().get_elisp_name())?;
|
||||
assert_bounds(original_document, emacs, rust.get_standard_properties())?;
|
||||
assert_bounds(original_document, emacs, rust)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user