Remove the GetStandardProperties trait.

This was using dynamic dispatch to deal with enums to avoid the repetitive typing.
This commit is contained in:
Tom Alexander
2023-10-31 21:20:39 -04:00
parent 49f6e70a19
commit bcf1b49db2
14 changed files with 159 additions and 218 deletions

View File

@@ -211,7 +211,6 @@ mod tests {
use crate::context::List;
use crate::parser::element_parser::element;
use crate::types::Element;
use crate::types::GetStandardProperties;
use crate::types::StandardProperties;
#[test]
@@ -227,10 +226,7 @@ mod tests {
_ => panic!("Should be a paragraph!"),
};
assert_eq!(Into::<&str>::into(remaining), "");
assert_eq!(
first_paragraph.get_standard_properties().get_source(),
"[cite:@foo]"
);
assert_eq!(first_paragraph.get_source(), "[cite:@foo]");
assert_eq!(first_paragraph.children.len(), 1);
match first_paragraph