Remove the GetStandardProperties trait.
This was using dynamic dispatch to deal with enums to avoid the repetitive typing.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user