diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-11 16:33:15 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-11 16:33:15 +0200 |
commit | 04e20a76e8022e3c1157314f598b765e9e073dcc (patch) | |
tree | 2a60bd77846f53db60c9351eb65de308da2f30fb /tests/xxx_mdx_plugin_recma_document.rs | |
parent | e484d1ecc5e405259767c0fd84072226fee40b71 (diff) | |
download | markdown-rs-04e20a76e8022e3c1157314f598b765e9e073dcc.tar.gz markdown-rs-04e20a76e8022e3c1157314f598b765e9e073dcc.tar.bz2 markdown-rs-04e20a76e8022e3c1157314f598b765e9e073dcc.zip |
Refactor some internals to accept mutable references
Diffstat (limited to 'tests/xxx_mdx_plugin_recma_document.rs')
-rw-r--r-- | tests/xxx_mdx_plugin_recma_document.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/xxx_mdx_plugin_recma_document.rs b/tests/xxx_mdx_plugin_recma_document.rs index 1cb91fe..9106c50 100644 --- a/tests/xxx_mdx_plugin_recma_document.rs +++ b/tests/xxx_mdx_plugin_recma_document.rs @@ -24,10 +24,9 @@ fn from_markdown(value: &str) -> Result<String, String> { }, )?; let hast = mdast_util_to_hast(&mdast); - let program = hast_util_to_swc(&hast, None, Some(&location))?; - let program = mdx_plugin_recma_document(program, &DocumentOptions::default(), Some(&location))?; - let value = serialize(&program.module); - Ok(value) + let mut program = hast_util_to_swc(&hast, None, Some(&location))?; + mdx_plugin_recma_document(&mut program, &DocumentOptions::default(), Some(&location))?; + Ok(serialize(&program.module)) } #[test] |