Lifetime issue.
This commit is contained in:
parent
a966be8122
commit
f1e985fb32
@ -112,23 +112,18 @@ pub(crate) enum IAstNode {
|
||||
Timestamp(ITimestamp),
|
||||
}
|
||||
|
||||
pub(crate) trait IntoIAstNode {
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
pub(crate) trait IntoIAstNode<'parse> {
|
||||
fn into_ast_node<'reg, 'orig, 'inp: 'reg + 'orig + 'parse>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse;
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>;
|
||||
}
|
||||
|
||||
impl IntoIAstNode for organic::types::DocumentElement<'_> {
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
impl<'parse> IntoIAstNode<'parse> for organic::types::DocumentElement<'parse> {
|
||||
fn into_ast_node<'reg, 'orig, 'inp: 'reg + 'orig + 'parse>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>> {
|
||||
async move {
|
||||
match self {
|
||||
organic::types::DocumentElement::Heading(inner) => {
|
||||
@ -143,14 +138,11 @@ impl IntoIAstNode for organic::types::DocumentElement<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoIAstNode for organic::types::Element<'_> {
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
impl<'parse> IntoIAstNode<'parse> for organic::types::Element<'parse> {
|
||||
fn into_ast_node<'reg, 'orig, 'inp: 'reg + 'orig + 'parse>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>> {
|
||||
async move {
|
||||
match self {
|
||||
organic::types::Element::Paragraph(inner) => {
|
||||
@ -231,14 +223,11 @@ impl IntoIAstNode for organic::types::Element<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoIAstNode for organic::types::Object<'_> {
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
impl<'parse> IntoIAstNode<'parse> for organic::types::Object<'parse> {
|
||||
fn into_ast_node<'reg, 'orig, 'inp: 'reg + 'orig + 'parse>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>> {
|
||||
async move {
|
||||
match self {
|
||||
organic::types::Object::Bold(inner) => {
|
||||
|
@ -49,12 +49,9 @@ macro_rules! iselector {
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
original: &'orig organic::types::$pstruct<'parse>,
|
||||
) -> BoxFuture<'inp, Result<$istruct, CustomError>> {
|
||||
async move {
|
||||
let $registry = registry;
|
||||
let $original = original;
|
||||
$fnbody
|
||||
}
|
||||
.boxed()
|
||||
let $registry = registry;
|
||||
let $original = original;
|
||||
async move { $fnbody }.boxed()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user