Remove lifetimes from wasm ast nodes.
This commit is contained in:
@@ -14,15 +14,15 @@ use crate::wasm::WasmAstNode;
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "paragraph")]
|
||||
pub struct WasmParagraph<'s, 'p> {
|
||||
pub struct WasmParagraph {
|
||||
pub(crate) standard_properties: WasmStandardProperties,
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties<'s, 'p>,
|
||||
pub(crate) children: Vec<WasmAstNode<'s, 'p>>,
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) children: Vec<WasmAstNode>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmParagraph<'s, 'p>,
|
||||
WasmParagraph,
|
||||
Paragraph<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
@@ -38,7 +38,7 @@ to_wasm!(
|
||||
.map(|child| {
|
||||
child
|
||||
.to_wasm(wasm_context.clone())
|
||||
.map(Into::<WasmAstNode<'_, '_>>::into)
|
||||
.map(Into::<WasmAstNode>::into)
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
@@ -50,14 +50,14 @@ to_wasm!(
|
||||
}
|
||||
);
|
||||
|
||||
impl<'s, 'p> Into<WasmAstNode<'s, 'p>> for WasmParagraph<'s, 'p> {
|
||||
fn into(self) -> WasmAstNode<'s, 'p> {
|
||||
impl Into<WasmAstNode> for WasmParagraph {
|
||||
fn into(self) -> WasmAstNode {
|
||||
WasmAstNode::Paragraph(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "wasm_test")]
|
||||
impl<'s, 'p> ElispFact<'s> for WasmParagraph<'s, 'p> {
|
||||
impl<'s> ElispFact<'s> for WasmParagraph {
|
||||
fn get_elisp_name<'b>(&'b self) -> std::borrow::Cow<'s, str> {
|
||||
"paragraph".into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user