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

@@ -96,7 +96,7 @@ mod tests {
use crate::context::List;
use crate::parser::element_parser::element;
use crate::parser::org_source::OrgSource;
use crate::types::GetStandardProperties;
use crate::types::StandardProperties;
#[test]
fn two_paragraphs() {
@@ -109,13 +109,7 @@ mod tests {
let (remaining, second_paragraph) =
paragraph_matcher(remaining).expect("Parse second paragraph.");
assert_eq!(Into::<&str>::into(remaining), "");
assert_eq!(
first_paragraph.get_standard_properties().get_source(),
"foo bar baz\n\n"
);
assert_eq!(
second_paragraph.get_standard_properties().get_source(),
"lorem ipsum"
);
assert_eq!(first_paragraph.get_source(), "foo bar baz\n\n");
assert_eq!(second_paragraph.get_source(), "lorem ipsum");
}
}