Give global options their own lifetime.

This commit is contained in:
Tom Alexander
2023-09-03 15:44:18 -04:00
parent a7b9eb9db4
commit df79cbd0b7
48 changed files with 470 additions and 466 deletions

View File

@@ -20,8 +20,8 @@ use crate::parser::util::get_consumed;
use crate::types::ExportSnippet;
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn export_snippet<'r, 's>(
context: RefContext<'_, 'r, 's>,
pub fn export_snippet<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, ExportSnippet<'s>> {
let (remaining, _) = tag("@@")(input)?;
@@ -50,8 +50,8 @@ pub fn export_snippet<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn backend<'r, 's>(
_context: RefContext<'_, 'r, 's>,
fn backend<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
let (remaining, backend_name) =
@@ -61,8 +61,8 @@ fn backend<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn contents<'r, 's>(
context: RefContext<'_, 'r, 's>,
fn contents<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
let (remaining, source) = recognize(verify(
@@ -73,8 +73,8 @@ fn contents<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn export_snippet_end<'r, 's>(
_context: RefContext<'_, 'r, 's>,
fn export_snippet_end<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
tag("@@")(input)