Do not parse the lesser block contents during parsing, but rather only if the contents are requested.
Some checks failed
rust-test Build rust-test has failed
clippy Build clippy has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has succeeded

This seemed like an unnecessary allocation during parsing, especially considering we throw away some parses based on whether or not we found radio targets in the source.
This commit is contained in:
Tom Alexander
2023-10-31 18:13:21 -04:00
parent 93cfa71df2
commit a5627d0cee
3 changed files with 124 additions and 82 deletions

View File

@@ -1576,7 +1576,7 @@ fn compare_example_block<'b, 's>(
[],
(
EmacsField::Required(":value"),
|r| Some(&r.contents),
|r| Some(r.get_contents()),
compare_property_quoted_string
),
(
@@ -1654,7 +1654,7 @@ fn compare_export_block<'b, 's>(
),
(
EmacsField::Required(":value"),
|r| Some(&r.contents),
|r| Some(r.get_contents()),
compare_property_quoted_string
)
) {
@@ -1702,7 +1702,7 @@ fn compare_src_block<'b, 's>(
),
(
EmacsField::Required(":value"),
|r| Some(&r.contents),
|r| Some(r.get_contents()),
compare_property_quoted_string
),
(