Remove intermediate lifetime.
This commit is contained in:
@@ -112,20 +112,23 @@ pub(crate) enum IAstNode {
|
||||
Timestamp(ITimestamp),
|
||||
}
|
||||
|
||||
trait IntoIAstNode<'intermediate, 'parse> {
|
||||
fn new<'b>(
|
||||
&'intermediate self,
|
||||
registry: &'b mut Registry<'intermediate, 'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>;
|
||||
pub(crate) trait IntoIAstNode {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse;
|
||||
}
|
||||
|
||||
impl<'intermediate, 'parse> IntoIAstNode<'intermediate, 'parse>
|
||||
for organic::types::DocumentElement<'parse>
|
||||
{
|
||||
fn new<'b>(
|
||||
&'intermediate self,
|
||||
registry: &'b mut Registry<'intermediate, 'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>> {
|
||||
impl IntoIAstNode for organic::types::DocumentElement<'_> {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
async move {
|
||||
match self {
|
||||
organic::types::DocumentElement::Heading(inner) => {
|
||||
@@ -140,13 +143,14 @@ impl<'intermediate, 'parse> IntoIAstNode<'intermediate, 'parse>
|
||||
}
|
||||
}
|
||||
|
||||
impl<'intermediate, 'parse> IntoIAstNode<'intermediate, 'parse>
|
||||
for organic::types::Element<'parse>
|
||||
{
|
||||
fn new<'b>(
|
||||
&'intermediate self,
|
||||
registry: &'b mut Registry<'intermediate, 'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>> {
|
||||
impl IntoIAstNode for organic::types::Element<'_> {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
async move {
|
||||
match self {
|
||||
organic::types::Element::Paragraph(inner) => {
|
||||
@@ -227,11 +231,14 @@ impl<'intermediate, 'parse> IntoIAstNode<'intermediate, 'parse>
|
||||
}
|
||||
}
|
||||
|
||||
impl<'intermediate, 'parse> IntoIAstNode<'intermediate, 'parse> for organic::types::Object<'parse> {
|
||||
fn new<'b>(
|
||||
&'intermediate self,
|
||||
registry: &'b mut Registry<'intermediate, 'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>> {
|
||||
impl IntoIAstNode for organic::types::Object<'_> {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
async move {
|
||||
match self {
|
||||
organic::types::Object::Bold(inner) => {
|
||||
|
||||
Reference in New Issue
Block a user