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 41625f2..1aa1b0d 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 83f43ef..bc425bb 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 4343fb3..9b5d358 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 a2b8a32..0e01095 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 042d487..b00ef4c 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 e2eb7bb..10d008f 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 c937db4..46eb8c5 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 5f8c881..1772816 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 34e2f73..285cf2a 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 79585ab..45ad645 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 ad52983..ef025b7 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 bdd92ef..34f9eb2 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 2057fc2..0a36b17 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 2a04cf5..78c90fa 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 4a5d1b6..477bc06 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 5ad38d4..e8c9230 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 2f0a551..4bae903 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 89a5930..802351b 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 0a5dc7d..34bd237 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 fb41a71..62cdb2b 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 ebafefe..13ee019 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 4caa158..eb021b3 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 0faf621..2025854 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 e15684d..8fa53af 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 51e73af..65296f8 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 28a3eaa..67b27e3 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 954b727..f7043ac 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 5d33318..0f64ab3 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 638f7fd..591ae4c 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 46a817a..8b2bd0b 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 99c6422..0e0b527 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 726d374..498a0c4 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 3cd8cd0..eefee46 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 36cfadc..6b248b2 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 a1ccffc..0365c9a 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 65b862a..8acb943 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 3996132..69933ae 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 f41c115..c61a91b 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 31d2051..4999ab6 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 039c1cd..dc10b55 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 ab19f5a..ac36d0d 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 a78d8ff..6de86e3 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 afa58e3..cedd83d 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 6f6d2d2..0781765 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 fc9bec3..ed254f0 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 8099c89..615b8fd 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 9d3d13d..da8de13 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 638564a..dc9e786 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 2e8fcb4..9ecff6e 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 3220cff..f5c0a9d 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 c5ca112..200c78f 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 776708f..ddb0375 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 6c86867..3c38f4d 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 152c841..4ef8dab 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 98c44af..91e1072 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 fd3e919..a9115e7 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 54d2900..29c2d99 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 b24d3aa..9584ce9 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 d35e557..f797a0d 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 927dd19..aa46650 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 da4f8c6..1bec077 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> {