Add a lifetime for data in the parsed result but not from the source.
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Heading;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Heading;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "headline")]
|
||||
pub(crate) struct WasmHeadline<'s> {
|
||||
pub(crate) struct WasmHeadline<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmHeadline<'s>,
|
||||
WasmHeadline<'s, 'p>,
|
||||
Heading<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
@@ -33,8 +33,8 @@ to_wasm!(
|
||||
}
|
||||
);
|
||||
|
||||
impl<'s> Into<WasmAstNode<'s>> for WasmHeadline<'s> {
|
||||
fn into(self) -> WasmAstNode<'s> {
|
||||
impl<'s, 'p> Into<WasmAstNode<'s, 'p>> for WasmHeadline<'s, 'p> {
|
||||
fn into(self) -> WasmAstNode<'s, 'p> {
|
||||
WasmAstNode::Headline(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user