From 995b41e6971c8f075d6da085c2bd421d555bcbaf Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 25 Dec 2023 12:42:38 -0500 Subject: [PATCH] Remove deserialize to support borrows. --- src/wasm/angle_link.rs | 2 +- src/wasm/ast_node.rs | 3 +++ src/wasm/babel_call.rs | 2 +- src/wasm/bold.rs | 2 +- src/wasm/center_block.rs | 2 +- src/wasm/citation.rs | 2 +- src/wasm/citation_reference.rs | 2 +- src/wasm/clock.rs | 2 +- src/wasm/code.rs | 2 +- src/wasm/comment.rs | 2 +- src/wasm/comment_block.rs | 2 +- src/wasm/diary_sexp.rs | 2 +- src/wasm/document.rs | 19 ++++++++++--------- src/wasm/drawer.rs | 2 +- src/wasm/dynamic_block.rs | 2 +- src/wasm/entity.rs | 2 +- src/wasm/example_block.rs | 2 +- src/wasm/export_block.rs | 2 +- src/wasm/export_snippet.rs | 2 +- src/wasm/fixed_width_area.rs | 2 +- src/wasm/footnote_definition.rs | 2 +- src/wasm/footnote_reference.rs | 2 +- src/wasm/headline.rs | 2 +- src/wasm/horizontal_rule.rs | 2 +- src/wasm/inline_babel_call.rs | 2 +- src/wasm/inline_source_block.rs | 2 +- src/wasm/italic.rs | 2 +- src/wasm/keyword.rs | 2 +- src/wasm/latex_environment.rs | 2 +- src/wasm/latex_fragment.rs | 2 +- src/wasm/line_break.rs | 2 +- src/wasm/node_property.rs | 2 +- src/wasm/org_macro.rs | 2 +- src/wasm/paragraph.rs | 2 +- src/wasm/parse_result.rs | 2 +- src/wasm/plain_link.rs | 2 +- src/wasm/plain_list.rs | 2 +- src/wasm/plain_list_item.rs | 2 +- src/wasm/plain_text.rs | 2 +- src/wasm/planning.rs | 2 +- src/wasm/property_drawer.rs | 2 +- src/wasm/quote_block.rs | 2 +- src/wasm/radio_link.rs | 2 +- src/wasm/radio_target.rs | 2 +- src/wasm/regular_link.rs | 2 +- src/wasm/section.rs | 2 +- src/wasm/special_block.rs | 2 +- src/wasm/src_block.rs | 2 +- src/wasm/standard_properties.rs | 2 +- src/wasm/statistics_cookie.rs | 2 +- src/wasm/strike_through.rs | 2 +- src/wasm/subscript.rs | 2 +- src/wasm/superscript.rs | 2 +- src/wasm/table.rs | 2 +- src/wasm/table_cell.rs | 2 +- src/wasm/table_row.rs | 2 +- src/wasm/target.rs | 2 +- src/wasm/timestamp.rs | 2 +- src/wasm/underline.rs | 2 +- src/wasm/verbatim.rs | 2 +- src/wasm/verse_block.rs | 2 +- 61 files changed, 72 insertions(+), 68 deletions(-) diff --git a/src/wasm/angle_link.rs b/src/wasm/angle_link.rs index 41625f28..1aa1b0d3 100644 --- a/src/wasm/angle_link.rs +++ b/src/wasm/angle_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmAngleLink<'s> { diff --git a/src/wasm/ast_node.rs b/src/wasm/ast_node.rs index 83f43efc..bc425bb0 100644 --- a/src/wasm/ast_node.rs +++ b/src/wasm/ast_node.rs @@ -1,3 +1,5 @@ +use serde::Serialize; + use super::angle_link::WasmAngleLink; use super::babel_call::WasmBabelCall; use super::bold::WasmBold; @@ -57,6 +59,7 @@ use super::underline::WasmUnderline; use super::verbatim::WasmVerbatim; use super::verse_block::WasmVerseBlock; +#[derive(Debug, Serialize)] pub enum WasmAstNode<'s> { // Document Nodes Document(WasmDocument<'s>), diff --git a/src/wasm/babel_call.rs b/src/wasm/babel_call.rs index 4343fb3b..9b5d3587 100644 --- a/src/wasm/babel_call.rs +++ b/src/wasm/babel_call.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmBabelCall<'s> { diff --git a/src/wasm/bold.rs b/src/wasm/bold.rs index a2b8a32f..0e01095f 100644 --- a/src/wasm/bold.rs +++ b/src/wasm/bold.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmBold<'s> { diff --git a/src/wasm/center_block.rs b/src/wasm/center_block.rs index 042d4871..b00ef4ca 100644 --- a/src/wasm/center_block.rs +++ b/src/wasm/center_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCenterBlock<'s> { diff --git a/src/wasm/citation.rs b/src/wasm/citation.rs index e2eb7bb8..10d008f5 100644 --- a/src/wasm/citation.rs +++ b/src/wasm/citation.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCitation<'s> { diff --git a/src/wasm/citation_reference.rs b/src/wasm/citation_reference.rs index c937db40..46eb8c52 100644 --- a/src/wasm/citation_reference.rs +++ b/src/wasm/citation_reference.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCitationReference<'s> { diff --git a/src/wasm/clock.rs b/src/wasm/clock.rs index 5f8c8817..1772816a 100644 --- a/src/wasm/clock.rs +++ b/src/wasm/clock.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmClock<'s> { diff --git a/src/wasm/code.rs b/src/wasm/code.rs index 34e2f732..285cf2a4 100644 --- a/src/wasm/code.rs +++ b/src/wasm/code.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCode<'s> { diff --git a/src/wasm/comment.rs b/src/wasm/comment.rs index 79585abe..45ad645c 100644 --- a/src/wasm/comment.rs +++ b/src/wasm/comment.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmComment<'s> { diff --git a/src/wasm/comment_block.rs b/src/wasm/comment_block.rs index ad529838..ef025b7e 100644 --- a/src/wasm/comment_block.rs +++ b/src/wasm/comment_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCommentBlock<'s> { diff --git a/src/wasm/diary_sexp.rs b/src/wasm/diary_sexp.rs index bdd92ef8..34f9eb26 100644 --- a/src/wasm/diary_sexp.rs +++ b/src/wasm/diary_sexp.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDiarySexp<'s> { diff --git a/src/wasm/document.rs b/src/wasm/document.rs index 2057fc23..0a36b170 100644 --- a/src/wasm/document.rs +++ b/src/wasm/document.rs @@ -1,7 +1,4 @@ -use std::marker::PhantomData; - use organic::types::Document; -use serde::Deserialize; use serde::Serialize; use super::ast_node::WasmAstNode; @@ -10,14 +7,13 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDocument<'s> { standard_properties: WasmStandardProperties, - additional_properties: Vec<(String, String)>, - children: Vec<()>, - phantom: PhantomData<&'s ()>, + additional_properties: Vec<(String, &'s str)>, + children: Vec>, } to_wasm!( @@ -37,11 +33,16 @@ to_wasm!( }) .collect(); + // let children = original + // .children + // .iter() + // .map(|child| child.to_wasm(wasm_context.clone())) + // .collect::, _>>()?; + Ok(WasmDocument { standard_properties, - additional_properties: Vec::new(), + additional_properties, children: Vec::new(), - phantom: PhantomData, }) } ); diff --git a/src/wasm/drawer.rs b/src/wasm/drawer.rs index 2a04cf5e..78c90fa0 100644 --- a/src/wasm/drawer.rs +++ b/src/wasm/drawer.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDrawer<'s> { diff --git a/src/wasm/dynamic_block.rs b/src/wasm/dynamic_block.rs index 4a5d1b60..477bc063 100644 --- a/src/wasm/dynamic_block.rs +++ b/src/wasm/dynamic_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDynamicBlock<'s> { diff --git a/src/wasm/entity.rs b/src/wasm/entity.rs index 5ad38d4f..e8c92307 100644 --- a/src/wasm/entity.rs +++ b/src/wasm/entity.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmEntity<'s> { diff --git a/src/wasm/example_block.rs b/src/wasm/example_block.rs index 2f0a5519..4bae903a 100644 --- a/src/wasm/example_block.rs +++ b/src/wasm/example_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmExampleBlock<'s> { diff --git a/src/wasm/export_block.rs b/src/wasm/export_block.rs index 89a5930c..802351ba 100644 --- a/src/wasm/export_block.rs +++ b/src/wasm/export_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmExportBlock<'s> { diff --git a/src/wasm/export_snippet.rs b/src/wasm/export_snippet.rs index 0a5dc7d1..34bd2373 100644 --- a/src/wasm/export_snippet.rs +++ b/src/wasm/export_snippet.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmExportSnippet<'s> { diff --git a/src/wasm/fixed_width_area.rs b/src/wasm/fixed_width_area.rs index fb41a71f..62cdb2bd 100644 --- a/src/wasm/fixed_width_area.rs +++ b/src/wasm/fixed_width_area.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmFixedWidthArea<'s> { diff --git a/src/wasm/footnote_definition.rs b/src/wasm/footnote_definition.rs index ebafefe9..13ee0197 100644 --- a/src/wasm/footnote_definition.rs +++ b/src/wasm/footnote_definition.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmFootnoteDefinition<'s> { diff --git a/src/wasm/footnote_reference.rs b/src/wasm/footnote_reference.rs index 4caa1580..eb021b34 100644 --- a/src/wasm/footnote_reference.rs +++ b/src/wasm/footnote_reference.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmFootnoteReference<'s> { diff --git a/src/wasm/headline.rs b/src/wasm/headline.rs index 0faf6212..2025854f 100644 --- a/src/wasm/headline.rs +++ b/src/wasm/headline.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmHeadline<'s> { diff --git a/src/wasm/horizontal_rule.rs b/src/wasm/horizontal_rule.rs index e15684d3..8fa53af1 100644 --- a/src/wasm/horizontal_rule.rs +++ b/src/wasm/horizontal_rule.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmHorizontalRule<'s> { diff --git a/src/wasm/inline_babel_call.rs b/src/wasm/inline_babel_call.rs index 51e73afb..65296f8b 100644 --- a/src/wasm/inline_babel_call.rs +++ b/src/wasm/inline_babel_call.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmInlineBabelCall<'s> { diff --git a/src/wasm/inline_source_block.rs b/src/wasm/inline_source_block.rs index 28a3eaae..67b27e38 100644 --- a/src/wasm/inline_source_block.rs +++ b/src/wasm/inline_source_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmInlineSourceBlock<'s> { diff --git a/src/wasm/italic.rs b/src/wasm/italic.rs index 954b727a..f7043ac6 100644 --- a/src/wasm/italic.rs +++ b/src/wasm/italic.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmItalic<'s> { diff --git a/src/wasm/keyword.rs b/src/wasm/keyword.rs index 5d333185..0f64ab37 100644 --- a/src/wasm/keyword.rs +++ b/src/wasm/keyword.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmKeyword<'s> { diff --git a/src/wasm/latex_environment.rs b/src/wasm/latex_environment.rs index 638f7fdc..591ae4cd 100644 --- a/src/wasm/latex_environment.rs +++ b/src/wasm/latex_environment.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmLatexEnvironment<'s> { diff --git a/src/wasm/latex_fragment.rs b/src/wasm/latex_fragment.rs index 46a817a3..8b2bd0b8 100644 --- a/src/wasm/latex_fragment.rs +++ b/src/wasm/latex_fragment.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmLatexFragment<'s> { diff --git a/src/wasm/line_break.rs b/src/wasm/line_break.rs index 99c6422d..0e0b5271 100644 --- a/src/wasm/line_break.rs +++ b/src/wasm/line_break.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmLineBreak<'s> { diff --git a/src/wasm/node_property.rs b/src/wasm/node_property.rs index 726d3748..498a0c4b 100644 --- a/src/wasm/node_property.rs +++ b/src/wasm/node_property.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmNodeProperty<'s> { diff --git a/src/wasm/org_macro.rs b/src/wasm/org_macro.rs index 3cd8cd06..eefee465 100644 --- a/src/wasm/org_macro.rs +++ b/src/wasm/org_macro.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmOrgMacro<'s> { diff --git a/src/wasm/paragraph.rs b/src/wasm/paragraph.rs index 36cfadce..6b248b21 100644 --- a/src/wasm/paragraph.rs +++ b/src/wasm/paragraph.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmParagraph<'s> { diff --git a/src/wasm/parse_result.rs b/src/wasm/parse_result.rs index a1ccffc3..0365c9a7 100644 --- a/src/wasm/parse_result.rs +++ b/src/wasm/parse_result.rs @@ -3,7 +3,7 @@ use serde::Serialize; use super::document::WasmDocument; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "status", content = "content")] pub(crate) enum ParseResult<'s> { #[serde(rename = "success")] diff --git a/src/wasm/plain_link.rs b/src/wasm/plain_link.rs index 65b862a1..8acb9434 100644 --- a/src/wasm/plain_link.rs +++ b/src/wasm/plain_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainLink<'s> { diff --git a/src/wasm/plain_list.rs b/src/wasm/plain_list.rs index 39961328..69933ae0 100644 --- a/src/wasm/plain_list.rs +++ b/src/wasm/plain_list.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainList<'s> { diff --git a/src/wasm/plain_list_item.rs b/src/wasm/plain_list_item.rs index f41c1158..c61a91b6 100644 --- a/src/wasm/plain_list_item.rs +++ b/src/wasm/plain_list_item.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainListItem<'s> { diff --git a/src/wasm/plain_text.rs b/src/wasm/plain_text.rs index 31d2051d..4999ab60 100644 --- a/src/wasm/plain_text.rs +++ b/src/wasm/plain_text.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainText<'s> { diff --git a/src/wasm/planning.rs b/src/wasm/planning.rs index 039c1cdd..dc10b556 100644 --- a/src/wasm/planning.rs +++ b/src/wasm/planning.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlanning<'s> { diff --git a/src/wasm/property_drawer.rs b/src/wasm/property_drawer.rs index ab19f5ae..ac36d0d0 100644 --- a/src/wasm/property_drawer.rs +++ b/src/wasm/property_drawer.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPropertyDrawer<'s> { diff --git a/src/wasm/quote_block.rs b/src/wasm/quote_block.rs index a78d8ff5..6de86e38 100644 --- a/src/wasm/quote_block.rs +++ b/src/wasm/quote_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmQuoteBlock<'s> { diff --git a/src/wasm/radio_link.rs b/src/wasm/radio_link.rs index afa58e33..cedd83d3 100644 --- a/src/wasm/radio_link.rs +++ b/src/wasm/radio_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmRadioLink<'s> { diff --git a/src/wasm/radio_target.rs b/src/wasm/radio_target.rs index 6f6d2d21..07817652 100644 --- a/src/wasm/radio_target.rs +++ b/src/wasm/radio_target.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmRadioTarget<'s> { diff --git a/src/wasm/regular_link.rs b/src/wasm/regular_link.rs index fc9bec34..ed254f0b 100644 --- a/src/wasm/regular_link.rs +++ b/src/wasm/regular_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmRegularLink<'s> { diff --git a/src/wasm/section.rs b/src/wasm/section.rs index 8099c89c..615b8fdc 100644 --- a/src/wasm/section.rs +++ b/src/wasm/section.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSection<'s> { diff --git a/src/wasm/special_block.rs b/src/wasm/special_block.rs index 9d3d13d6..da8de137 100644 --- a/src/wasm/special_block.rs +++ b/src/wasm/special_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSpecialBlock<'s> { diff --git a/src/wasm/src_block.rs b/src/wasm/src_block.rs index 638564a6..dc9e786b 100644 --- a/src/wasm/src_block.rs +++ b/src/wasm/src_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSrcBlock<'s> { diff --git a/src/wasm/standard_properties.rs b/src/wasm/standard_properties.rs index 2e8fcb40..9ecff6e6 100644 --- a/src/wasm/standard_properties.rs +++ b/src/wasm/standard_properties.rs @@ -6,7 +6,7 @@ use serde::Serialize; use super::to_wasm::ToWasmContext; use super::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] pub(crate) struct WasmStandardProperties { begin: usize, end: usize, diff --git a/src/wasm/statistics_cookie.rs b/src/wasm/statistics_cookie.rs index 3220cff4..f5c0a9d6 100644 --- a/src/wasm/statistics_cookie.rs +++ b/src/wasm/statistics_cookie.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmStatisticsCookie<'s> { diff --git a/src/wasm/strike_through.rs b/src/wasm/strike_through.rs index c5ca1126..200c78ff 100644 --- a/src/wasm/strike_through.rs +++ b/src/wasm/strike_through.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmStrikeThrough<'s> { diff --git a/src/wasm/subscript.rs b/src/wasm/subscript.rs index 776708fb..ddb03750 100644 --- a/src/wasm/subscript.rs +++ b/src/wasm/subscript.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSubscript<'s> { diff --git a/src/wasm/superscript.rs b/src/wasm/superscript.rs index 6c868679..3c38f4d8 100644 --- a/src/wasm/superscript.rs +++ b/src/wasm/superscript.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSuperscript<'s> { diff --git a/src/wasm/table.rs b/src/wasm/table.rs index 152c841b..4ef8dab3 100644 --- a/src/wasm/table.rs +++ b/src/wasm/table.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTable<'s> { diff --git a/src/wasm/table_cell.rs b/src/wasm/table_cell.rs index 98c44af0..91e1072b 100644 --- a/src/wasm/table_cell.rs +++ b/src/wasm/table_cell.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTableCell<'s> { diff --git a/src/wasm/table_row.rs b/src/wasm/table_row.rs index fd3e919d..a9115e70 100644 --- a/src/wasm/table_row.rs +++ b/src/wasm/table_row.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTableRow<'s> { diff --git a/src/wasm/target.rs b/src/wasm/target.rs index 54d29007..29c2d99a 100644 --- a/src/wasm/target.rs +++ b/src/wasm/target.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTarget<'s> { diff --git a/src/wasm/timestamp.rs b/src/wasm/timestamp.rs index b24d3aa8..9584ce9c 100644 --- a/src/wasm/timestamp.rs +++ b/src/wasm/timestamp.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTimestamp<'s> { diff --git a/src/wasm/underline.rs b/src/wasm/underline.rs index d35e5574..f797a0d8 100644 --- a/src/wasm/underline.rs +++ b/src/wasm/underline.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmUnderline<'s> { diff --git a/src/wasm/verbatim.rs b/src/wasm/verbatim.rs index 927dd199..aa46650f 100644 --- a/src/wasm/verbatim.rs +++ b/src/wasm/verbatim.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmVerbatim<'s> { diff --git a/src/wasm/verse_block.rs b/src/wasm/verse_block.rs index da4f8c6b..1bec0779 100644 --- a/src/wasm/verse_block.rs +++ b/src/wasm/verse_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmVerseBlock<'s> {